IISExpress cannot find ssl page running localhost

2019-03-10 19:20发布

When I access the site as http://localhost:26049, the site runs fine. If I try to access the site with https://localhost:44319, I get page not found.

This is my project properties:

project properties

This is from my IISExpress application config:

<site name="MVC Authentication" id="2">
    <application path="/" applicationPool="Clr4IntegratedAppPool">
        <virtualDirectory path="/" physicalPath="F:\Projects\MySite\Test" />
    </application>
    <bindings>
        <binding protocol="https" bindingInformation="*:44319:localhost" />
        <binding protocol="http" bindingInformation="*:26049:localhost" />
    </bindings>
</site>

10条回答
唯我独甜
2楼-- · 2019-03-10 19:59

The steps followed by me to resolve this (I am using vs2015) enter image description here

1)Go to control panel

2)Add Remove Programs

3)Repair IIS Express

4)Restarted my computer

4)Next go to my documents->IIS Express->Config Files

5)Take a copy of them and Remove those files from there

6)Delete all items C:\Temp

7)Check for .vs folder in your sln file and goto config folder in it

8)Take a copy of that as well and remove the files inside it

9)Clean your solution

10)Restart Visual studio

11)Build and run

(I copied clean config files from my colleagues machine - in locations mentioned above
1]In Documents
2] .vs folder
I suppose Just running IISExpress and it will recreate the file for you. The exe is located at: "c:\Program Files\IIS Express\iisexpress.exe". )

查看更多
我命由我不由天
3楼-- · 2019-03-10 20:00

None of these options worked for me in VS2017 with the same problem. This solution using iisexpresscmdadmin with a self-signed cert got my site to finally pull up:

How do I fix a missing IIS Express SSL Certificate?

查看更多
成全新的幸福
4楼-- · 2019-03-10 20:03

Using VS 2017, none of these solutions seemed to work, even after exporting certificate and importing into Chrome. It finally worked after I did two things: (1) copied the localhost certificate from Personal to Trusted Root (2) changed the port number in project properties from 61899 to 44300 I think doing just step (2) did the trick.

查看更多
Anthone
5楼-- · 2019-03-10 20:07

Try changing bindings in IIS

This link is what solved my 3 day long intermittent headache: https://deanhume.com/set-up-iis-7-to-run-a-secure-site-locally-https/

Here are the specific steps that lead to my discovery of the real problem:

Windows key > Administrative tools > Internet Information Services > Click on Default Website (or whatever your website is) > Bindings... > Blow all the duplicate bindings away for local host > Add https binding for port 80.

查看更多
登录 后发表回答