Coder Perfect

The specified argument was not within the range of acceptable values. site is the name of the parameter.


This is the type of error I’m getting:

any time I’m debugging one of my projects

After reinstalling Visual Studio 2012, I tried again. But it’s the same kind of issue I’m having with Debugging.

The following are the settings on my system:

When displaying a web page, an exception is thrown.

[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

Asked by Rahul_RJ

Solution #1

If using IIS:

If you’re using IIS Express, you’ll need to do the following:

Open the old control panel’s ‘Add/Remove Programs’ and repair IIS Express. You could also navigate to Control Panel ->> Programs ->> Programs and Features ->> Programs and Features ->> Activate or deactivate Windows features ->> Check the box next to Internet Information Services, as seen in the image below:

Answered by MustafaP

Solution #2

When I installed the 2017 Fall Creator Update, this occurred to me. I was successful in resolving the issue by repairing IIS 10.0 Express (I do not have IIS installed on my box.)

Note: As one of the commenters pointed out,

Answered by Rich T

Solution #3

I had the same issue i resolved it by repairing the iis server in programs and features.


Control panel > remove an application, then right-click the installed iis express server (installed with Visual Studio) and select repair from the menu.

This is how I resolved the problem.

Answered by tanveer ahmad dar

Solution #4

I had the same issue with VS2017. Following solved the issue.

This should take care of your issue. For further information, see this link.

Answered by Sikandar Amla

Solution #5

Rather than installing the bulky IIS, I remedy my issue by installing Internet Information Services Hostable Web Core from the Windows Features menu.

Answered by Johan Bakar

Post is based on