'How to switch ASP.NET Core MVC application from IIS Express to local IIS after allowing Visual Studio to generate IIS certificate?

I had a previously running ASP.NET Core MVC application working fine on local IIS in Visual Studio when I hit the PLAY button, however some other sites and applications I was working on, on the same computer, did not run on IIS Manager when browsing directly to them from IIS manager or running them in Visual Studio.

Most applications that uses HTTPS for example mentioned that the "Remote Certificate is invalid for the validation procedure message". Yet for some other sites that used IIS Express, it worked fine.

What I have done to try to fix this is:

  1. Removed the original IIS Self Signed Certificate from IIS Manager
  2. Then deleted the website that was working fine
  3. I then used GIT to clone the repository the application is located in
  4. When I opened the solution again that previously worked in Visual Studio it gave me the following message about creating a new IIS Certificate:

Message I get when opening visual studio after deleting the already Self Signed IIS Express Certificate for Local development

  1. Initially I hit YES to this which may be the cause of the problem
  2. Now when I run the application that previously was working and seemed to be using LOCAL IIS, it keeps defaulting to IIS EXPRESS I can see beside the play button

Is there anyway I can put this back to running on LOCAL IIS for my ASP.NET Core MVC application? I cannot see it listed even in the IIS Manager on my computer.

Thanks

Henry



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source