Microsoft Bot Framework,Visual Studio 2015和2017启动错误

Rag*_*ghu 3 iis-express visual-studio-2015 botframework visual-studio-2017

  1. 下载的bot模拟器和vs模板代码,如https://docs.microsoft.com/en-us/bot-framework/resources-tools-downloads中所述.

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

  3. 更新了所有nuget包.

  4. 按F5运行应用程序.我收到以下错误:

    '/'应用程序中的服务器错误.

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

    描述:执行当前Web请求期间发生未处理的异常.请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息.

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

    来源错误:

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

    堆栈跟踪:

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

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

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

    事件代码:3005事件消息:发生了未处理的异常.活动时间:5/24/2017 11:36:28 PM活动时间(UTC):5/25/2017 6:36:28 AM活动编号:9914b02cd15f4282b9043b1f70097b3e活动顺序:1活动开始:1活动详情代码:0

    应用程序信息:应用程序域:/ LM/W3SVC/2/ROOT-1-131401677887853236信任级别:
    应用程序虚拟路径:/应用程序路径:c:\ users \用户A\documents\visual studio 2017\Projects\MyFirstBotApp\MyFirstBotApp\Machine名称:DESKTOP-BQ93HFB

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

    异常信息:异常类型:ArgumentOutOfRangeException异常消息:指定的参数超出了有效值的范围.参数名称:System.Web.Configuration.WebConfigurationHost.InitForConfiguration(String&locationSubPath,String&configPath,String&locationConfigPath,IInternalConfigRoot configRoot,Object [] hostInitConfigurationParams)中的站点,位于System.Configuration.Configuration..ctor(String locationSubPath,Type typeConfigHost,Object [在System.Web.Configuration.WebConfigurationHost.OpenConfiguration的System.Configuration.Internal.InternalConfigConfigurationFactory.System.Configuration.InternalConfigConfigurationFforyConfigurationFactory.Create(Type typeConfigHost,Object [] hostInitConfigurationParams)中的(hostInitConfigurationParams)(WebLevel webLevel,ConfigurationFileMap文件映射,VirtualPath路径, System.Web.Configuration.WebConfigurationManager.OpenWebConfigurationImpl中的String site,String locationSubPath,String server,String userName,String password,IntPtr tokenHandle(WebLevel webLevel,ConfigurationFileMap fileMap,String path,String site,String locationSubPath,String server,String u System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags,PolicyLevel policyLevel,Exception appDomainCreationException)的System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment(String appId,IApplicationHost appHost,HostingEnvironmentParameters hostingParameters)中的serName,String password,IntPtr userToken)

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

    线程信息:线程ID:5线程帐户名称:DESKTOP-BQ93HFB \用户A模拟:False堆栈跟踪:在System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags,PolicyLevel policyLevel,Exception appDomainCreationException)

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

不知道还有什么可以在这里检查以解决问题.任何帮助表示赞赏.

Rag*_*ghu 5

我不知道我需要安装一个名为"Internet Information Services Hostable Web Core"的Windows功能组件.一旦我安装了这个组件,它运行正常.不确定IIS Express是如何处理此组件的,以及在安装IIS Express时未启用它的原因.奇怪的!