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

Vic*_*uak 0 c# asp.net visual-studio asp.net-mvc-4

我正在使用Visual Studio 2015,Windows 10 hp笔记本电脑.在我创建了一个asp.net mvc应用程序之后,构建并运行它我得到了这个错误:

指定的参数超出有效值范围参数名称:site
说明:在执行当前Web请求期间发生了未处理的异常
堆栈跟踪:
[ArgumentOutOfRangeException:指定的参数超出了有效值的范围.参数名称:site]
System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags,hostingFlags,PolicyLevel,policylevel,Exception appDomainCreationException)+560
[HttpException(0x80004005):指定的参数超出了有效值的范围.参数名称:site]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context)+765
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)+95
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerReuest wr,HttpContext context)+195

Vic*_*uak 18

这解决了这个问题

  • 控制面板
  • 程序和特点
  • 打开或关闭Windows功能
  • 勾选互联网信息服务
  • 然后重启Laptop

它对我有用

我在这里找到答案