Sign in
Log inSign up
Learn from My Fails: Migrating from Windows 10 to Windows Server 2012 R2

Learn from My Fails: Migrating from Windows 10 to Windows Server 2012 R2

Jack Kinsey's photo
Jack Kinsey
·Jan 9, 2016

Recently at work I had to re-purpose a laptop as a web server to host a local site the company uses at various seminars, and I wrestled with it for a solid 1 1/2 days trying to get everything configured.

I wanted to share my experience with dealing with this mess, and hopefully help anyone else that may have to do something like this one day.


Why Windows Server?

Well, we were just running the site via IIS that comes with any flavor of Windows. This was working well enough until we decided to implement SignalR.

Our app displays a presenter's current slide on a web page along with the relevant page from the companion book that attendees receive. We were effectively doing this in a "long poll" manner by having each user constantly ask the server, "Hey, is there a new slide?" If the slide had been changed then the server would send it back to the user. SignalR allows us to put that responsibility on the server. So now, a user connects and the server will just automatically send the new slides, as they come in, directly to the clients.


Ok...But Why Windows Server?

Well, SignalR achieves this via WebSockets, and a WebSocket is essentially a connection that remains open. Before, we were just firing off AJAX requests every couple seconds for each user. The client would connect, get the info, and get out, ending the connection. But now, we would just have an open connection that would allow the server to notify every client of the changes without them asking for it. Pretty great!

Well, this open connection has a side-effect that I did not know about (although in hindsight it makes perfect sense). The standard versions of Windows (7, 8.1, 10, etc) have a limit on the number of open connections that can be made. I believe most have a limit of 8-10 connections. Well we have 30+ attendees at each seminar so we need 30+ connections simultaneously.


Enter Windows Server

Windows Server doesn't have this limitation...obviously (if it did no one would probably use WebSockets). So, the task was thrust upon my shoulders to install Windows Server on our laptop we were using as a server. It's an "OK" laptop. Nothing great, but should function as a small-scale web server well enough.

I perform a backup and install Server, and then I just set up IIS again. Pretty simple, right?


Wrong

Issue #1: Drivers

Yeah, you know why you don't put Server on a laptop? Because driver support fucking sucks, that's why!

Luckily, most of the drivers for this particular laptop that were aimed at Windows 8.1 (since 2012 R2 coincides with 8.1) work rather well. But I had to download them on another PC because both the LAN and WiFi drivers were completely shot. So beware of driver support, or you know...actually install Server on hardware that is meant to be a server.

Now the lack of drivers wasn't too bad once I found something that got the job done. It is the next issue that gave me the biggest fight and had me near tears.

Issue #2: 0x800f0922

I have memorized that error code. You know why? Because I entered it into Google exactly 300,523 times! Okay, that may be a bit of an exaggeration, but seriously it was a lot. I searched so many variations of this error and got zilch.

It was occurring as I tried to set up the Web Server (IIS) role through Server Manager. The role and IIS features would start to install and almost finish and then...BAM...ERROR: 0x800f0922 This role and/or feature could not be installed.

WTF?!

Looking up this error gave me results about it popping up when trying to install the DNS Server role while still connected to a network that already had a DNS Server on it. This was my only real clue as to what was going on.

Other results talked about things like the "component store" being corrupted, and if you run the following in PowerShell everything will resolve itself.

DISM /Online /Clean /RestoreHealth

NOPE.

This didn't work for me.

I tried re-installing the OS thinking that maybe it was a corrupted install, but still my problems persisted.

I went home feeling defeated and got some sleep all while having fever dreams of a man chasing me through the woods. I ran and ran, but he kept gaining on me. I saw a cabin in the distance and ran faster. I got to the cabin an busted down the door, but I was too late. The crazed maniac grabbed me and turned me around to face him. It was me, and on my forehead in red letters: 0x800f0922.

I need to stop taking my work home with me. Luckily, I got enough sleep to reboot my brain and the answer came soon after getting to work the next morning.

Light at the End of the Tunnel

The answer lies in the issue I found involving the DNS Server above. Another instance of IIS blocking Server Manager from installing IIS.

But how can that be? This is a fresh install!

Right, but Windows does the weird thing that I guess I understand, but it is still kind of weird.

When you install a new version of Windows all your old files are put into the directory, C:\Windows.old. So I thought maybe it was something about this old version of Windows, but I noticed something else in C:\. I had a Dropbox folder.

Dropbox? I didn't install Dropb...WAIT!...Dropbox was on the old install! And look! There's C:\web! That is where the site files were stored! And there they are, in the web directory? What the hell?

How? They weren't even in the Windows.old folder? They were just in the root C directory.

I deleted them and got rid of the Windows.old directory (I already made a backup so this wasn't needed anyway), and restarted the machine.

I opened Server Manager and tried the server role install again...and EUREKA! IT WORKED! It finally worked! All the pain and personal anguish...SUCH HELL...FOR NOTHING!

So there you have it.

Error 0x800f0922 is Windows Server heavily cryptic way of saying, "Yo, the shit you are trying to install is already here, dawg."


Thanks for reading and hopefully you have learned something from my fail. Good night and good luck.