Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Start error with Microsoft Bot Framework, Visual Studio 2015 and 2017

  1. Downloaded bot emulator and vs template code as described in https://learn.microsoft.com/en-us/bot-framework/resources-tools-downloads.

  2. Created a new bot application after launching VS 2015 [Version: 14 Update 3] with admin privileges (and also with VS 2017 [Version: 15.2] with same end result) on my Windows 10 machine (Version: 1703; OS Build: 16199.1000).

  3. Updated all nuget packages.

  4. Pressed F5 to run the application. I get following error:

    Server Error in '/' Application.

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

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: site

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: site] System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException) +280

    [HttpException (0x80004005): Specified argument was out of the range of valid values. Parameter name: 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. The Application event log has following information:

    Event code: 3005 Event message: An unhandled exception has occurred. Event time: 5/24/2017 11:36:28 PM Event time (UTC): 5/25/2017 6:36:28 AM Event ID: 9914b02cd15f4282b9043b1f70097b3e Event sequence: 1 Event occurrence: 1 Event detail code: 0

    Application information: Application domain: /LM/W3SVC/2/ROOT-1-131401677887853236 Trust level:
    Application Virtual Path: / Application Path: c:\users\User A\documents\visual studio 2017\Projects\MyFirstBotApp\MyFirstBotApp\ Machine name: DESKTOP-BQ93HFB

    Process information: Process ID: 14320 Process name: iisexpress.exe Account name: DESKTOP-BQ93HFB\User A

    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)

    Request information: Request URL: http://localhost:3979/ Request path: / User host address: ::1 User:
    Is authenticated: False Authentication Type:
    Thread account name: DESKTOP-BQ93HFB\User A

    Thread information: Thread ID: 5 Thread account name: DESKTOP-BQ93HFB\User A Is impersonating: False Stack trace: at System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException)

  6. I checked the Project Properties under Web tab. The deployment server is set as IIS Express. I also verified that I have IIS Express with version 10.0.14358.1000 installed. (Note: I can run and create Web Api applications without any problems.)

Not sure what else to check here to resolve the problem. Any help is appreciated.

like image 538
Raghu Avatar asked May 24 '26 02:05

Raghu


1 Answers

I did not know that I needed to install a windows feature component called 'Internet Information Services Hostable Web Core'. Once I installed this component, it worked fine. Not sure what IIS Express has go to do with this component and why it was not enabled when IIS Express is already installed. Weird!

like image 180
Raghu Avatar answered May 30 '26 07:05

Raghu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!