Specified argument was out of the range of valid v

2019-01-03 04:11发布

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

11条回答
ら.Afraid
2楼-- · 2019-01-03 05:07

When you start with a Specific Page while debugging your project, and you are using Local IIS, you might have filled a wrong value in the Specific Page textbox.

(via Project Properties > Web > Start Action > Specific Page)

Wrong configuration:

Specific Page: "http://localhost/MyApplication/Start/SpecificPage.aspx"
Project Url: "http://localhost/MyApplication"

Right configuration:

Specific Page: "/Start/SpecificPage.aspx"
Project Url: "http://localhost/MyApplication"

Note: Ignore the quotation marks.

查看更多
Melony?
3楼-- · 2019-01-03 05:09

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

  1. Run Command prompt as Administrator.
  2. Write following two commands which will update your registry.

reg add HKLM\Software\WOW6432Node\Microsoft\InetStp /v MajorVersion /t REG_DWORD /d 10 /f

reg add HKLM\Software\Microsoft\InetStp /v MajorVersion /t REG_DWORD /d 10 /f

This should solve your problem. Refer to this link for more details.

查看更多
对你真心纯属浪费
4楼-- · 2019-01-03 05:09

Modify was greyed out for me, but adding the IIS Management Console under programs and features fixed this for me. Also on Windows 10 fall update.

查看更多
smile是对你的礼貌
5楼-- · 2019-01-03 05:10

Instead of installing the bloated IIS, I get mine resolved by installing Internet Information Services Hostable Web Core from the Windows Features

查看更多
做个烂人
6楼-- · 2019-01-03 05:16

I got this issue when trying to run a project targeting Framework 4.5 in VS2017. After changing it to Framework 4.6.X it got fixed by itself.

查看更多
登录 后发表回答