Unable to launch the IIS Express Web server

2019-01-03 04:14发布

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 server https://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.


30条回答
时光不老,我们不散
2楼-- · 2019-01-03 04:48

After disabling the firewall I was able to run it without any issues.

查看更多
【Aperson】
3楼-- · 2019-01-03 04:48

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.

查看更多
霸刀☆藐视天下
4楼-- · 2019-01-03 04:48

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.)

查看更多
一夜七次
5楼-- · 2019-01-03 04:48

My issue required a 3-fold solution:

  1. Remove the IISExpress folder in your Documents folder.
  2. Set the web project as your startup project by either right-clicking it and select "Set as startup project", or doing so through your solution properties.
  3. Set the startup URL, or set to "Current Page" or "Specific Page". Mine was set to "Don't open a page. Wait for a request from an external application" and I had to change it to "Specific Page", which I leave blank so it will go to my app's home page, before it would work.
查看更多
聊天终结者
6楼-- · 2019-01-03 04:50

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.

查看更多
Explosion°爆炸
7楼-- · 2019-01-03 04:52

The only solution that worked for me was to create another test project. Then following the next steps:

  1. Right click the project and go to Properties -> Web

  2. 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.

  3. Navigate to the project which is giving this error. Right click the project and go to Properties -> Web.

  4. Paste the project URL in the Use Local IIS Web Server section (URL copied from the test project). Close the test project and save.

  5. 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.

查看更多
登录 后发表回答