ASP.NET on Windows 8.1/ IIS 8.5 (trials and tribulations)

15. January 2014 13:32 by Chris in dev, IT Pro, Windows 8  //  Tags:   //   Comments (0)

When I upgraded my main dev laptop from Win7 to Win8 (then 8.1) I had problems with ASP.NET under IIS. I put off sorting the issue out as I had IIS Express working adequately for development but this was never going to be a long term solution. Hopefully the issue arose due only to my upgrade path but it has come time to sort this out and surely this path must be fairly common?

My first issue was a HTTP Error 500.19 which http://stackoverflow.com/questions/12208209/iis-8-0-asp-net-and-error-500-19 helped with - as per one contributor I had to set Modules also to Read/Write instead of ReadOnly. Next though the site wasn't picking up my default aspx document and, digging further, even though ASP.NET was apparently installed (2.X and 4.X) handler mappings for aspx were notable by their absence (MIME type mappings are not required nowadays as these are just for static types). Oh, as an aside as well the .NET installers don't work on windows 8.1 (the solution google liked) - you must instead enable the Windows feature, not that this worked fully in my case.;( 

To reinforce this with a little detail, the next google hit was http://stackoverflow.com/questions/11319311/mime-types-missing-in-iis-7-for-asp-net-404-17. i.e. manually installing ASP.NET

I tried running 
 
aspnet_regiis.exe -i
 
But I instead received the message that this wasn't supported in this version of windows and that I should instead try one of: turning windows features on and off, the server management tool (N/A) or the dism.exe command line tool.
 
So in lieu of the command line option I next tried uninstalling and installing again (2.X and 4.X) - the thought did occur that this might be just an ASP.NET 3.5 problem, as that was the version of my test site. No joy.  Next, brute force approach and I tried adding all features under ASP.NET under windows features. Still no joy. Then I happened across a response someway down in http://stackoverflow.com/questions/3762287/script-not-served-by-static-file-handler-on-iis7-5 which referred to Windows 8 and hence possibly my problem as there was remarkably little from google on such Windows 8.X/ IIS 8.X issues. This referred to an additional 3.5 setting  within Application Development Features. I had to google again as this is several levels down in the config:
 
 
Got there in the end and it worked for 3.5 though as I'd broken a few things along the way I'm not sure if I'm ready to try 4.X as well!
 
Microsoft sure don't make life easy sometimes!
 

About the author

I am Dr Christopher Sully (MCPD, MCSD) and I am a Cardiff, UK based IT Consultant/ Developer and have been involved in the industry since 1996 though I started programming considerably earlier than that. During the intervening period I've worked mainly on web application projects utilising Microsoft products and technologies: principally ASP.NET and SQL Server and working on all phases of the project lifecycle. If you might like to utilise some of the aforementioned experience I would strongly recommend that you contact me. I am also trying to improve my Welsh so am likely to blog about this as well as IT matters.

Month List