Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cocoa/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio 2015 Microsoft Bot Framework、Visual Studio 2015和2017的启动错误_Visual Studio 2015_Visual Studio 2017_Botframework_Iis Express - Fatal编程技术网

Visual studio 2015 Microsoft Bot Framework、Visual Studio 2015和2017的启动错误

Visual studio 2015 Microsoft Bot Framework、Visual Studio 2015和2017的启动错误,visual-studio-2015,visual-studio-2017,botframework,iis-express,Visual Studio 2015,Visual Studio 2017,Botframework,Iis Express,下载的bot emulator和vs模板代码,如中所述 在我的Windows 10计算机(版本:1703;操作系统内部版本:16199.1000)上以管理员权限(以及具有相同最终结果的VS 2017[版本:15.2])启动VS 2015[版本:14更新3]后,创建了一个新的bot应用程序 更新了所有nuget软件包 按F5运行应用程序。我发现以下错误: “/”应用程序中出现服务器错误 指定的参数超出了有效值的范围。 参数名称:站点 描述:执行当前web请求期间发生未处理的异常。请查看堆栈跟踪以了

下载的bot emulator和vs模板代码,如中所述

  • 在我的Windows 10计算机(版本:1703;操作系统内部版本:16199.1000)上以管理员权限(以及具有相同最终结果的VS 2017[版本:15.2])启动VS 2015[版本:14更新3]后,创建了一个新的bot应用程序

  • 更新了所有nuget软件包

  • 按F5运行应用程序。我发现以下错误:

    “/”应用程序中出现服务器错误

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

    描述:执行当前web请求期间发生未处理的异常。请查看堆栈跟踪以了解有关错误的更多信息以及错误在代码中的起源

    异常详细信息:System.ArgumentOutOfRangeException:指定的参数超出有效值的范围。 参数名称:站点

    源错误:

    在执行当前web请求期间生成了未经处理的异常。有关异常的起源和位置的信息可以使用下面的异常堆栈跟踪来识别

    堆栈跟踪:

    [ArgumentOutOfRangeException:指定的参数超出有效值的范围。 参数名称:站点] System.Web.HttpRuntime.HostingIT(HostingEnvironmentFlags hostingFlags,PolicyLevel PolicyLevel,Exception appDomainCreationException)+280

    [HttpException(0x80004005):指定的参数超出有效值的范围。 参数名称:站点] System.Web.HttpRuntime.FirstRequestInit(HttpContext上下文)+10041024 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext上下文)+95 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr,HttpContext上下文)+254

  • 应用程序事件日志包含以下信息:

    活动编号:3005 事件消息:发生未处理的异常。 活动时间:2017年5月24日11:36:28 活动时间(UTC):2017年5月25日上午6:36:28 事件ID:9914B02CD15F428B9043B1F70097B3E 事件顺序:1 事件发生率:1 事件详细信息代码:0

    申请资料: 应用程序域:/LM/W3SVC/2/ROOT-1-131401677887853236 信任级别:
    应用程序虚拟路径:/ 应用程序路径:c:\users\User A\documents\visual studio 2017\Projects\MyFirstBotApp\MyFirstBotApp\ 机器名称:DESKTOP-BQ93HFB

    过程信息: 进程ID:14320 进程名称:iisexpress.exe 帐户名称:DESKTOP-BQ93HFB\用户A

    例外信息: 异常类型:ArgumentOutOfRangeException 异常消息:指定的参数超出有效值的范围。 参数名称:站点 在System.Web.Configuration.WebConfigurationHost.InitForConfiguration(字符串和位置子路径、字符串和配置路径、字符串和位置配置路径、IInternalConfigRoot配置根、对象[]hostInitConfigurationParams) 在System.Configuration.Configuration..ctor(字符串locationSubPath,键入typeConfigHost,对象[]hostInitConfigurationParams) 在System.Configuration.Internal.InternalConfigConfigurationFactory.System.Configuration.Internal.IIInternalConfigurationFactory.Create(键入类型ConfigHost,对象[]hostInitConfigurationParams) 在System.Web.Configuration.WebConfigurationHost.OpenConfiguration(WebLevel WebLevel、ConfigurationFileMap fileMap、VirtualPath路径、字符串站点、字符串位置子路径、字符串服务器、字符串用户名、字符串密码、IntPtr令牌句柄) 在System.Web.Configuration.WebConfigurationManager.openwebconfigurationmpl(WebLevel-WebLevel,ConfigurationFileMap-fileMap,String-path,String-site,String-locationSubPath,String-server,String-userName,String-password,IntPtr-userToken) 位于System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags,PolicyLevel PolicyLevel,Exception appDomainCreationException)的System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment(字符串appId,IApplicationHost appHost,HostingEnvironmentParameters hostingParameters hostingParameters)

    请求信息: 请求URL: 请求路径:/ 用户主机地址:::1 用户:
    已验证:False 身份验证类型:
    线程帐户名称:DESKTOP-BQ93HFB\User A

    线程信息: 线程ID:5 线程帐户名称:DESKTOP-BQ93HFB\User A 是模仿:假 堆栈跟踪:位于System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags、PolicyLevel PolicyLevel、Exception appDomainCreationException)

  • 我检查了Web选项卡下的项目属性。部署服务器设置为IIS Express。我还验证了已安装版本为10.0.14358.1000的IIS Express。(注意:我可以毫无问题地运行和创建Web Api应用程序。)


  • 不确定还需要检查什么才能解决问题。非常感谢您的帮助。

    我不知道我需要安装一个名为“Internet信息服务可承载Web核心”的windows功能组件。一旦我安装了这个组件,它工作得很好。不确定IIS Express与此组件有何关系,以及为什么在已安装IIS Express时未启用此组件。奇怪

    虽然上面的答案是正确的,但在安装了IIS Express的windows更新后,我遇到了此错误


    卸载并重新安装IIS将解决此问题。由于某种原因,windows update破坏了它,仅仅修复程序并不能解决问题。

    也有类似的问题

    安装Windows 10 1709更新后,启动VS 2015需要一段时间。启动后,加载我的项目并点击F5,导致以下异常:

    Exception information: 
        Exception type: ArgumentOutOfRangeException 
        Exception message: Specified argument was out of the range of valid values.
    Parameter name: site
       at System.Web.Configuration.WebConfigurationHost.InitForConfiguration(String& locationSubPath, String& configPath, String& locationConfigPath, IInternalConfigRoot configRoot, Object[] hostInitConfigurationParams)
       at System.Configuration.Configuration..ctor(String locationSubPath, Type typeConfigHost, Object[] hostInitConfigurationParams)
       at System.Configuration.Internal.InternalConfigConfigurationFactory.System.Configuration.Internal.IInternalConfigConfigurationFactory.Create(Type typeConfigHost, Object[] hostInitConfigurationParams)
       at System.Web.Configuration.WebConfigurationHost.OpenConfiguration(WebLevel webLevel, ConfigurationFileMap fileMap, VirtualPath path, String site, String locationSubPath, String server, String userName, String password, IntPtr tokenHandle)
       at System.Web.Configuration.WebConfigurationManager.OpenWebConfigurationImpl(WebLevel webLevel, ConfigurationFileMap fileMap, String path, String site, String locationSubPath, String server, String userName, String password, IntPtr userToken)
       at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)   at System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException)
    
    首先,我关闭了我的VS并删除了.VS文件夹的内容。再次加载我的解决方案时,VS似乎可以正确地重新创建配置,但仍然无法工作

    第二,下载了IIS10expre