I am getting this Kind of Error like::
Specified argument was out of the range of valid values.Parameter name: site
while Debugging any of my Project.
I have also tried after Reinstalling My Visual Studio 2012. But again the same kind of problem I am getting while Debugging.
My System's Configurations are :
- Windows 8 : 32-bit
- Visual Studio : 2012
Exception is thrown at the time of Showing Web Page Like,
[ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: site]
System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException) +298
[HttpException (0x80004005): Specified argument was out of the range of valid values.
Parameter name: site]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9873912
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
This resolved the issue on Windows 10 after the last update
go Control Panel ->> Programs ->> Programs and Features ->> Turn Windows features on or off ->> Internet Information Services
But based on previous response it doesn't work unless checking all these options as on pic below
I had the same issue i resolved it by repairing the iis server in programs and features.
GO TO
Controll panel > uninstall a program and then right click the installed iis express server (installed with Visual Studio) and then click repair.
this is how i solved this issue
If using IIS:
If using IIS Express:
Open 'Add/Remove Programs' from the old control panel and run a repair on IIS Express Or you might go Control Panel ->> Programs ->> Programs and Features ->> Turn Windows features on or off ->> Internet Information Services and check the checkbox as shown in the picture below:
This occurred to me when I applied the 2017 Fall Creator Update. I was able to resolve by repairing IIS 10.0 Express (I do not have IIS installed on my box.)
Note: As a user pointed out in the comments,
If you are okay with using the built in Visual Studio Development server or you don't want to or cannot install IIS, you can change the web server the project uses by going into
I don't know how it happened to me, but somehow this option was changed to "Use Local IIS Web Server" for one of my projects.
For me, it was happening because I had switched over to "Run as Administrator". Just one instance of VS was running, but running it as admin threw this error. Switching back fixed me right up.