Downloaded bot emulator and vs template code as described in https://docs.microsoft.com/en-us/bot-framework/resources-tools-downloads.
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).
Updated all nuget packages.
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
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)
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.
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!
While the answer above is correct I ran into this error after a windows update with IIS Express already installed.
Uninstalling and reinstalling IIS will fix the problem. For some reason the windows update broke it and just repairing the program does not fix the problem.
Had pretty much the same problem.
After installing Windows 10 1709 update, staring VS 2015 took a while. After it started, loaded my project and hit F5 resulting in the following exception:
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)
First, I closed my VS and deleted the Content of .vs folder. Loaded my solution again, VS seemed to recreate the config properly but still did not work.
Second, downloaded IIS 10 Express installation, uninstalled the existing one, installed the new one ..seems to work.
But now my SQL server seems not to work, but that is another story.
User contributions licensed under CC BY-SA 3.0