Error starting with Microsoft Bot Framework, Visual Studio 2015 and 2017
-
Downloaded bot emulator and vs template code as described at https://docs.microsoft.com/en-us/bot-framework/resources-tools-downloads .
-
Created a new bot app after running VS 2015 [Version: 14 Update 3] with administrator privileges (as well as VS 2017 [Version: 15.2] with the same end result) on my Windows 10 machine (Version: 1703; OS Build: 16199.1000).
-
All nuget packages have been updated.
-
Press the F5 key to launch the application. I am getting the following error:
Server error in application "/".
The specified argument was out of range. Parameter name: site
Description: An unhandled exception was thrown during the execution of the current web request. Review the stack trace for more information about the error and how it occurs in your code.
Exception Details: System.ArgumentOutOfRangeException: The specified argument was out of range. Parameter name: site
Source error:
An unhandled exception was thrown during the execution of the current web request. Information about the origin and location of an exception can be identified using the exception stack trace below.
Stack trace:
[ArgumentOutOfRangeException: The specified argument was out of range. Parameter name: Site] System.Web.HttpRuntime.HostingInit (HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException) +280
[HttpException (0x80004005): The specified argument was out of range. Parameter name: site] System.Web.HttpRuntime.FirstRequestInit (HttpContext context) +10041024 System.Web.HttpRuntime.EnsureFirstRequestInit (HttpContext context) +95 System.Web.HttpRuntime.ProcessRequestNotificationPrivate context) +95 System.Web.HttpRuntime.ProcessRequestNotificationPrivateer (IIS7Context)
-
The application event log has the following information:
Event ID: 3005 Event Message: An unhandled exception occurred. Event time: 05/24/2011 11:36:28 AM Event time (UTC): 5/25/2017 6:36:28 AM Event ID: 9914b02cd15f4282b9043b1f70097b3e Sequence of events: 1 Event: 1 Event detail code: 0
Application Information: Scope: / 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-BQ93HFBProcess Information: Process ID: 14320 Process Name: iisexpress.exe Account Name: DESKTOP-BQ93HFB \ User A
Exception Information: Exception Type: ArgumentOutOfRangeException Exception message: The specified argument was out of range. Parameter name: site in System.Web.Configuration.WebConfigurationHost.InitForConfiguration (String & locationSubPath, String & configPath, String & locationConfigPath, IInternalConfigRoot configRoot, Object [] hostInitConfigurationParams) in System.Configuration.ConfigurationPostctor (String type locationSubPath , Object [] hostInitConfigurationParams) in System.Configuration.Internal.InternalConfigConfigurationFactory.System.Configuration.Internal.IInternalConfigConfigurationFactory.Create (Type typeConfigHost, Object [] hostInitConfigurationParams) in System.Web.Configuration.WebConfiguration fileVirtualPath path, String site, String locationSubPath, String server, String userName, String password, IntPtr tokenHandle) to System.Web.Configuration.WebConfigurationManager.OpenWebConfigurationImpl (WebLevel webLevel, ConfigurationFileMap fileMap, String path, String site, String server locationSubPath String userName, String password, IntPtr userToken) at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment (String appId, IApplicationHost appHost, HostingEnvironmentParameters, hostingParameters) at System.Web.HttpRuntime.HostingEnvironment Exception (policyCreationOpenWebConfigurationImpl (WebLevel webLevel, ConfigurationFileMap fileMap, String path, String site, String locationSubPath, String server, String userName, String password, IntPtr userToken) at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironmentHostingEnvironment System.Web.HttpRuntime.HostingInit (HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException)OpenWebConfigurationImpl (WebLevel webLevel, ConfigurationFileMap fileMap, String path, String site, String locationSubPath, String server, String userName, String password, IntPtr userToken) at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironmentHostingProvide System.Web.HttpRuntime.HostingInit (HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException)HostingInit (HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException)HostingInit (HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException)
Request Information: Request URL: http: // localhost: 3979 / Request Path: / User Host Address: 1 User:
Authenticated: False Authentication Type:
Topic Account Name: DESKTOP-BQ93HFB \ User AThread Information: Thread: 5 Topic Account Name: DESKTOP-BQ93HFB \ User A Posing: False Stack Trace: at System.Web.HttpRuntime.HostingInit (HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException)
-
I checked the project properties under the Web tab. The deployment server is configured as IIS Express. I also confirmed that I have IIS Express installed with version 10.0.14358.1000 installed. (Note: I can run and build Web Api applications without any problem.)
Not sure what else needs to be checked here to fix the problem. Any help is appreciated.
source to share
I didn't know that I needed to install a Windows features component called "Internet Information Services Hostable Web Core". Once I installed this component it worked fine. Not sure if IIS Express uses this component and why it was not enabled when IIS Express is already installed. Weird!
source to share
Had almost the same problem.
After installing Windows 10 Update 1709, VS 2015 took a while to watch. After starting it loaded my project and hit F5, which resulted 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 VS and deleted the contents of the .vs folder. After uploading my solution again, VS seemed to recreate the configuration correctly, but still didn't work.
Second, downloaded the IIS 10 Express installation, uninstalled the existing one, installed the new one. Where to start working.
But now my SQL server doesn't seem to work, but that's another story.
source to share