简体   繁体   English

指定的参数超出有效值范围。 参数名称:site

[英]Specified argument was out of the range of valid values. Parameter name: site

I am getting this Kind of Error like:: 我收到这种错误:

Specified argument was out of the range of valid values.Parameter name: site 指定的参数超出有效值范围。参数名称: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 Visual Studio 2012之后,我也尝试过。但是同样,调试时遇到的同样问题。

My System's Configurations are : 我的系统的配置是:

  • Windows 8 : 32-bit Windows 8:32位
  • Visual Studio : 2012 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

If using IIS: 如果使用IIS:

  • control panel 控制面板
  • Programs 程式
  • open or close windows features 打开或关闭Windows功能
  • tick internet information services 勾选互联网信息服务
  • then restart your visual studio 然后重新启动Visual Studio

If using IIS Express: 如果使用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: 从旧的控制面板中打开“添加/删除程序”,然后在IIS Express上运行修复,或者您可以进入控制面板 ->> 程序 ->> 程序和功能 ->> 打开或关闭Windows功能 ->> Internet信息服务并选中复选框,如下图所示:

在此处输入图片说明

This occurred to me when I applied the 2017 Fall Creator Update. 当我应用2017年秋季创作者更新时,这发生在我身上。 I was able to resolve by repairing IIS 10.0 Express (I do not have IIS installed on my box.) 我可以通过修复IIS 10.0 Express来解决(我的包装箱中安装IIS。)

Note: As a user pointed out in the comments, 注意:正如用户在评论中指出的那样,

Repair can be found in "Programs and Features" - the "classic" control panel. 可以在“程序和功能”-“经典”控制面板中找到维修。

I had the same issue i resolved it by repairing the iis server in programs and features. 我有一个相同的问题,我通过在程序和功能中修复iis服务器来解决。

GO TO

Controll panel > uninstall a program and then right click the installed iis express server (installed with Visual Studio) and then click repair. 控制面板>卸载程序,然后右键单击已安装的iis Express服务器(随Visual Studio一起安装),然后单击修复。

this is how i solved this issue 这就是我解决这个问题的方式

I had the same issue with VS2017. 我对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添加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 reg添加HKLM \\ Software \\ Microsoft \\ InetStp / v MajorVersion / t REG_DWORD / d 10 / f

This should solve your problem. 这应该可以解决您的问题。 Refer to this link for more details. 有关更多详细信息,请参考此链接

我没有安装the肿的IIS,而是通过从Windows功能安装Internet Information Services可托管Web Core来解决我的问题

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. 当您在调试项目时从特定页面开始时,并且您正在使用本地IIS,则可能在“特定页面”文本框中填写了错误的值。

(via Project Properties > Web > Start Action > Specific Page) (通过“项目属性”>“ Web”>“开始操作”>“特定页面”)

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. 注意:忽略引号。

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 如果您可以使用内置的Visual Studio Development服务器,或者不想或不能安装IIS,则可以通过以下方式更改项目使用的Web服务器:

  1. Project Properties (right click project in solution explorer and select properties) 项目属性(在解决方案资源管理器中右键单击项目,然后选择属性)

  2. select Web tab 选择网页标签

  3. select "Use Visual Studio Development Server". 选择“使用Visual Studio开发服务器”。

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. 我不知道这是怎么回事,但是对于我的一个项目,此选项以某种方式更改为“使用本地IIS Web服务器”。

This resolved the issue on Windows 10 after the last update 上次更新后,这解决了Windows 10上的问题

go Control Panel ->> Programs ->> Programs and Features ->> Turn Windows features on or off ->> Internet Information Services 进入控制面板->>程序->>程序和功能->>打开或关闭Windows功能->> Internet信息服务

But based on previous response it doesn't work unless checking all these options as on pic below 但是基于先前的响应,除非检查所有这些选项(如下图所示),否则它将不起作用

在此处输入图片说明

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. 仅有一个VS实例正在运行,但是以管理员身份运行它会引发此错误。 Switching back fixed me right up. 切换回固定我。

Modify was greyed out for me, but adding the IIS Management Console under programs and features fixed this for me. 修改对我来说是灰色的,但是在程序和功能下添加IIS管理控制台对我来说是固定的。 Also on Windows 10 fall update. 同样在Windows 10上进行秋季更新。

I got this issue when trying to run a project targeting Framework 4.5 in VS2017. 尝试在VS2017中运行针对Framework 4.5的项目时遇到此问题。 After changing it to Framework 4.6.X it got fixed by itself. 在将其更改为Framework 4.6.X之后,它已自行修复。

  • Navigate to Control Panel > Programs > Programs and Features and repair the IIS Express. 导航到控制面板>程序>程序和功能,然后修复IIS Express。
  • Restart the visual studio. 重新启动Visual Studio。

To turn on the IIS is not recommended as other comments suggests if you are not using your system as a live server. 不建议打开IIS,因为如果您不将系统用作实时服务器,则其他注释会建议您这样做。 For development purpose only IIS Express is adequate. 对于开发目的,仅IIS Express就足够了。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 指定的参数超出了有效值的范围。 参数名称:值 - Specified argument was out of the range of valid values. Parameter name: value 指定的参数超出有效值范围。 参数名称:大小 - Specified argument was out of the range of valid values. Parameter name: size 得到“指定的参数超出有效值范围。 参数名称:” - Getting “Specified argument was out of the range of valid values. Parameter name:” 指定的参数超出了有效值的范围。参数名称:site - 由于创建者更新而导致的错误 - Specified argument was out of the range of valid values. Parameter name: site - Error Due To Creators Update MEF指定的参数超出有效值范围。 参数名称:site - MEF Specified argument was out of the range of valid values. Parameter name: site 异常:指定的参数超出有效值的范围。 (参数“索引”) - Exception: Specified argument was out of the range of valid values. (Parameter 'index') FastMember:指定的参数超出有效值范围。 参数名称:名称 - FastMember: Specified argument was out of the range of valid values. Parameter name: name System.ArgumentOutOfRangeException: '指定的参数超出了有效值的范围。 参数名称:asp.net中的index' - System.ArgumentOutOfRangeException: 'Specified argument was out of the range of valid values. Parameter name: index' in asp.net 指定的参数超出有效值范围。 参数名称:大小和串口通讯 - Specified argument was out of the range of valid values. Parameter name: size & Serial Port Communication 指定的参数超出有效值范围。 参数名称索引。 由ObservableCollection.Add()方法抛出 - Specified argument was out of the range of valid values. parameter name index. thrown by ObservableCollection.Add() method
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM