I have an asp.net MVC 4 solution. When I try to open it using Visual studio 2012, I get following error:
Microsoft Visual Studio
Configuring Web
https://localhost:
for ASP.NET 4.5 failed. You must manually configure this site for ASP.NET 4.5 in order for the site to run correctly. Could not find the serverhttps://localhost:44300/
on the local machine. Make sure the local IIS server has been configured to support secure communications.OK Help
Although the solution opens. Also, When I try to run it from debug menu, I get following error:
Unable to launch the IIS Express Web server.
The start URL specified is not valid. https://localhost:44300/
and I can not debug the code. how to get rid of these errors and debug/run the web site from VS 2012 ?
Please suggest.
This question is related to
visual-studio
iis
iis-express
I had a similar problem when running my solution from VS2012:
Unable to launch the IIS Express Web server.
The start URL specified is not valid. https://localhost:44301/
I had the incorrect project selected as Startup Project. I made the Cloud project the Startup (right click on project -> Set as Startup Project) and everything started working fine.
After disabling the firewall I was able to run it without any issues.
None of the other solutions worked for me. I disabled edit-and-continue, and all is well :)
I had the same issue, the cause was that the flag "override application root URL" was set under Properties --> Web After I removed the flag, IIS Express was starting fine with the defined port.
There is no need to delete the entire IISExpress folder in the directory C:\Users[you]\Documents\IISExpress.
Just comment:
<binding protocol="https" bindingInformation="*:8090:localhost" />
in the applicationhost.config file in the IISExpress folder.
@roblll had it right. But for those of you who didn't want to dig for the answer, here it is:
Note that there's a binding for HTTP with the port you intend to use for https.
//Change this:
<binding protocol="http" bindingInformation="*:44300:localhost" />
//to this:
<binding protocol="https" bindingInformation="*:44300:localhost" />
Keep in mind, Visual Studio might have supplied different ports than you expected. Just make sure that the ports in the binding correspond to what's in the Web tab of your project's properties.
http://www.hanselman.com/blog/WorkingWithSSLAtDevelopmentTimeIsEasierWithIISExpress.aspx
I had the same problem but the solution that worked for me was different.
That was all I needed to get things running.
i will suggest one way to fix this issue:
1.Delete the \Documents\IISExpress folder using the following console command: rmdir /s /q "%userprofile%\Documents\IISExpress"
Delete the applicationhost.config file which is placed within the .vs\Config\ folder in your Visual Studio project root folder.
Change the project’s website random URL: within Visual Studio, right-click to the project node in Solution Explorer, then select Properties; navigate through the Web panel, then change the number in the Project Url textbox value.
Add the _CSRUN_DISABLE_WORKAROUNDS Environment System variable with the value of 1 as shown in the following screenshot (thanks to Juan M. Elosegui for reporting this on this SO thread and for the image):
Good Luck !
Along with the answer given by @Yehuda Shapira I had to make another change which is Delete the .csproj.user file where the binding information like
<IISUrl>http://localhost:54462/</IISUrl>
is stored.Delete that File Close visual Studio and then rebuild.Hope this helps.
After Two Hour searching on web i found my solution as bellow steps - close visual studio - remove .vs folder of your project - open visual studio and rerun project
thats work for me have a good time
The only solution that worked for me was to create another test project. Then following the next steps:
Right click the project and go to Properties -> Web
Under the project URL in the Use Local IIS Web Server section, copy the project URL(http:// localhost:59002/) - this is from the test project.
Navigate to the project which is giving this error. Right click the project and go to Properties -> Web.
Paste the project URL in the Use Local IIS Web Server section (URL copied from the test project). Close the test project and save.
Delete the test project and run the project that gave the error. Works after that...
Maybe not the best way but it was the only way I could get this to work. I received this error message after I reloaded my laptop (hard drive crashed) and got all of my projects from the server of where they where hosted.
In my case the project was on network drive and deleting IIS Express folder didn't help as described in other answers. My workaround was copying the project to local drive and it worked!
Well none of the above mentioned steps worked for me. In my case my applicationhost.config
file was somehow missing the following two line of code
<add name="rules-64-ISAPI-2.0" path="*.rules" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness64" />
<add name="xoml-64-ISAPI-2.0" path="*.xoml" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness64" />
Hope this can help some one.
I had the same problem, in my case I just cleaned and then rebuild my solution and it worked for me
I had the same problem.Please Follow below steps :
1- Open applicationhost file in Documents\IISExpress\config and add below code if it's not exist
<site name="solutionname" id="2">
<application path="/" applicationPool="solutionname">
<virtualDirectory path="/" physicalPath="physicaladdressofproject" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:xxxx:localhost" />
</bindings>
</site>
2- Then go to the root file of your project and delete all of updates are done on the project by using different version of Visual Stdio
3- Next go to [root].vs\config and delete applicationhost it will be created automatically
4-Run the project
It worked for me.
I had similar issue - VS couldn't load particular web project because of that error. Here is what helped:
UseIISExpress
and/or UseIIS
sections and make sure that they don't intersect with each other.In my case it was like this:
...
<UseIISExpress>True</UseIISExpress>
...
<UseIIS>True</UseIIS>
...
So, I've changed this to:
...
<UseIISExpress>True</UseIISExpress>
...
<UseIIS>False</UseIIS>
...
and then it worked.
I had the exact same problem.
The reason - bad IIS config file.
Try deleting the automatically-created IISExpress
folder, which is usually located at %userprofile%/Documents
, e.g. C:\Users\[you]\Documents\IISExpress
.
Don't worry, VS should create it again - correctly, this time - once you run your solution again.
EDIT: Command line for deleting the folder:
rmdir /s /q "%userprofile%\Documents\IISExpress"
My issue required a 3-fold solution:
Restarting the computer was the only thing that worked for me. Classic 101 IT :)
In my case after I allowed external request to my IIS Express website and configured windows firewall to allow iisexpress.exe, I can't start it from within Visual Studio 2013. I can still start it with command line, and it serves local and external requests well.
C:\Program Files (x86)\IIS Express>iisexpress /site:MyWebSiteName
I tried to create a firewall rule to allow my port, after that VS worked.
I had the same issue and then I opened the task manager -> processes then killed the iisexpress.exe process. After that I tried to run the application and was able to run it successfully
I'd set up Internet Connection Sharing on my machine for virtual machines. I switched it off and I was able to debug in Visual Studio 2015. However to consistently debug following a reboot, I needed to set the Internet Connection Sharing service to manual start up, even though none of my internet connections had Internet Connection Sharing enabled.
For a 2021 Solution in dotnet core, you can fix this error by right-clicking the project in Solution Explorer, and choosing 'Edit Project File'.
On the Debug Tab, at the bottom, you can directly configure the desired port and whether to use SSL or not.
Changes here need to be saved with Control+S. Once that's done, you can launch the project and confirm it fixed your issue, no having to delete IISFolders or anything else suggested here.
check the antivirus firewall and allow access visual studio to network. for example in nod32:
goto setting (f5) -> network->personal firewall->rules and zones
in the "zone and rule editor
" click "setup
" and find the vs 2010
or 12
or ... and allow access to network.
Sharing this for future readers. Manually creating a virtual directory worked for me.
None of the methods presented here worked for me. What finally worked was to set the DevelopmentServerPort to 0 in the .csproj file:
<WebProjectProperties>
<UseIIS>True</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>0</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:52973/</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
I had the same problem, thanks to @Jacob for giving information about it.
The Reason is - wrong entry for your project in config file applicationhost located at
C:\Users\(yourusername)\Documents\IISExpress\config
It worked for me and hope it should work for you also.
VS2015
edit file .csproj.user
Insert the following xml tags (do not duplicate if already exists)
<UseIIS>True</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>2870</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:2859</IISUrl>
<OverrideIISAppRootUrl>True</OverrideIISAppRootUrl>
<IISAppRootUrl>http://localhost:2859</IISAppRootUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>http://localhost/app</CustomServerUrl>
Insert above tags in XML node bellow:
<ProjectExtensions><VisualStudio><FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}"><WebProjectProperties>
Please go through the snapshot, I faced the same error but the following setting resolved it
Select Current page as Start Action
Select specific port in Servers option and enter port 26641 , in virtual path enter /
NTLM option should be unchecked
In my case, I went to Debug > Project Properties > Web (in visual studio) and then I changed IIS Express to Local IIS in servers section
I ran in to this error today. Running Win 8.1 and VS 2013. Suddenly my projects could not run anymore and i got the message "Unable to launch the IIS Express Web server" and no further information.
After a while I found out that all the projects that the IIS Express could not start all were running .net 3.5. Projects running later versions did start ok.
The solution for me was to remove .net 3.5 (from control panel -> turn windows features on/off), restart windows and the add .net 3.5 again.
Before you try anything else, make sure you 1. restart visual studio (mostly for refreshing memory resident options from files) and 2. restart your system (mostly for invalid file locking). If your problem is such temporary or self-fixed those will do without changing anything. It worked for me with PC restart. Also if you work on a multi-user project make sure you have the latest workable version - someone else may had check in something invalid by mistake at e.g. the project file and you mess with your system for no reason. If those won't work, then you probably need to alter some setting(s) that are stuck, missing or need modification - there are plenty propositions on other answers.
Jason's Shavers series of articles here http://jasonrshaver.com/?tag=/Client+Certificates explain exactly how to set up your applicationhost.config site entry to allow the app to run in either ssl or standard http.
One of the things he recommends is putting two binding entries for the site. This is what I did.
<bindings>
<binding protocol="http" bindingInformation="*:59945:localhost" />
<binding protocol="https" bindingInformation="*:44300:localhost"/>
</bindings>
He also recommends changing other settings as well. It worked on two of my three machines. Each time I am told to manually configure a site in the application host it usually has to do with the bindings. (example using same port for multiple web apps.)
Had been messing around with IISExpress and Project to try and get it listening on a different URL than localhost, when reverting back I had this error and after following all the answers here, none of them worked.
Eventually noticed that in the projects Porperties -> Web I had 'Start URL' checked under Start Action, but the input box was empty. Changing this to 'Current Page' fixed my issue.
I had the same issue. I had deleted a lot of folders under C:/users/
path to free some space on my machine. After which I started getting this error.
I just had to restart my machine and it all worked fine.
I was also facing this problem after I run XAMPP's Apache Server on my PC. For running it, I kill all the process on 8086 port by writing net stop http
on the administrator command prompt. I think killing the processes caused this problem for me.
For me, this problem is solved after doing the following steps;
SQL Server Agent (SQLEXPRESS)
.C:\Users\<your pc name>\Documents
and deleting IISExpress folder.Delete contents inside IISExpress folder and Close and Open the visual studio. and Run again. It should be fine.
Or Change the port number
We had the same issue with our sites. We were able to fix this all inside of Visual Studio. We are using 2012 Ultimate.
The underlying issue we saw was that with SSL enabled, for some reason, VS was assigning the same port for the standard and secure URLs. This issue seemed to arise when we were pulling the code down from TFS.
To remedy it, we undertook the following steps:
Make sure that the check box for Override application root URL is unchecked.
I had the same problem with VS 2013 and even after all possible tries it was not working.My problem was solved by:
- In control panel (Program and Features) I found that all of the IIS related features were unchecked.I finally checked all of those and restarted my system.
- Then I started my VS 2013 as administrator and thats it everything
worked fine then.
At least you can give this a try since it worked for me.
Same Problem, but needed to start VS2013 in Admin Mode.
Try following steps:
Have a good luck!
I read all the answers herein and then, as mentioned in Mihail Shishkov answer, jumped to Project Properties > Web > Servers > Create Virtual Directory. This had the effect of getting me by the exception:
Unable to launch the IIS Express Web server. The start URL specified is not valid. http://localhost:44300/
in my case I added new site binding on applicationHost.config file after delete that binding it work correct. the applicationHost.config path is in youre project root directory on .VS(hidden) folder
I ran into this exact problem recently and it was because the project was stored on a network drive. Since IIS locally runs as NetworkService it didn't have access to the network share where the project was stored. Assuming that opening a project from a network share is against best-practices, I copied the project to the local C:\ drive and then the project ran as expected.
It seems you need to do some configuring as you seem to be using SSL; here's a step-by-step guide by Scott Hanselman himself.
Start with deleting the file IISEXPRESS
that exists in your directory, then start debugging.
If that does not solve the problem, go to your Project (Ctrl+Alt+L). Right click -> Properties -> Debug and Check "Enable Windows Authentication".
I too had this issue, after turning off the firewall, after opening as administrator, after double checking all the settings were correct.
My problem was unique in that I wanted to test SSL locally, but also have the service available over the LAN. So I'd changed the app URL to use the local IP aka. 192.168.1.10 in my case.
Switching back to localhost fixed the problem, as did turning off SSL, so I discovered that the local SSL cert only worked for localhost.
I had the same problem after installing Visual Studio 2013 Update 3.
VS 2013 can not load Microsoft.VisualStudio.TraceLogPackage.dll
Unable to launch the IIS Express Web server
My problem solved by doing the following steps :
1. Repair Visual Studio 2013 Update 3
2. Start the Developer Command Prompt
as administrator.
3. Type devenv.exe /setup
then press enter
If using VS2015 or above
Make sure iisexpress process is not running.
Make sure no other process is using your desired port. You can do that by executing
netstat -a -b
in the console (as Administrator, type cmd
in start menu, right click and choose 'Run as admiminstrator'). If you see an entry which state is ESTABLISHED or LISTENING for example it means that some other process is using this port. You'll need to terminate that process or change the port.
Then delete the following file
<<path_to_solution_folder>>\.vs\config\applicationhost.config
note the .vs
folder may be hidden
then find <<project-name>>.csproj.user
file, open it with text editor (notepad)
and make sure IISUrl
under WebProjectProperties
is configured to <IISUrl>http://localhost:XXXXX/</IISUrl>
where XXXXX
is your desired port.
after doing this and trying to start the app you may get
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Then go to {Project Properties} -> Web and Press the "Create Virtual Directory" button
In my situation, the IIS Express applicationhost.config file had a typo in the managedRuntimeVersion attribute of several elements. This was happening for both Visual Studio 2012 and Visual Studio 2013. I only received the first part of the message, stating:
Unable to launch the IIS Express Web server.
It logged an error in the event log with the message:
The worker process failed to pre-load .Net Runtime version v4.030319.
The correct runtime version is v4.0.30319 (note the second period.)
The steps I took to correct:
Visual Studio successfully started IIS Express the next time I debugged a web application.
My problem was eventually solved when I looked at the IIS Express registry key:
HKEY_CURRENT_USER\Software\Microsoft\IISExpress
I had an entry CustomUserHome
pointing to My Web Sites which was causing havoc.
Source: Stackoverflow.com