Today, I faced one issue while working on one sample . And could not find solution in one go and error shown was not intuitive enough.
First let me share my environment. Windows 8 (64 bit), Visual Studio 2012, IIS8
I created an ASP.NET 2.0 web service using Visual Studio 2012 directly at IIS8. But as soon as, I tried to access my web service via browser I found the following error
As you can see from the error, it does not point to any cause.
For this error there could be one issue that IIS is not registered with ASP.NET. So to register it, I opened the command prompt with run as administrator and navigated to the folder C:\Windows\Microsoft.NET\Framework\v2.0.50727. I navigated to framework version 2.0 because I was accessing the ASP.NET 2.0 webservice. Now I required to run the following command
aspnet_regiis -i
But as soon as I run the above command, I faced another error
Later, I found that my Operating System (Windows 8) that I am running is of 64 bit version. So again navigated 64bit version executable and it ran successfully
So you can see above the message “Finished installing ASP.NET <2.0.50727>”. Here in the above pic, if you see the red encircled area, I have ran here 64 bit version executable.
Also note, this issue arises only if you installed the IIS after installing Visual Studio.
Hope this would save lot of time of yours.
Thanks,
Brij