Unable to launch the IIS Express Web server

M J 681 Reputation points
2023-02-09T17:00:10.8933333+00:00

I have one project that will not open in Visual Studio unless I change it from [RequireHttps] and then of course I need to remember to change it back before publishing. Which I have been doing but I would like to resolve this issue.

This is the message I am getting

Unable to launch the IIS Express Web server. Output from IIS Express: Failed to register URL "https://localhost:52540/" for site "VHRC" application "/". Error Description: Cannot create a file when that file already exists. (0x800700b7)

I have tried a number of suggestions people have recommended on other posts to no avail.

Can someone assist me in how I can correct this

Internet Information Services
{count} votes

2 answers

Sort by: Most helpful
  1. XuDong Peng-MSFT 11,181 Reputation points Microsoft Vendor
    2023-02-10T03:36:30.4833333+00:00

    Hi @M J,

    This problem is probably caused by the port being occupied, please try the following steps:

    1. Find the path of solution and navigate to <path_to_solution_folder>\.vs\config\applicationhost.config
    2. Check the configuration of <bindings> section have any problem in your site.

    Or you can close the VS solution and delete the applicationhost.config file and re-open the solution, and then check if it works fine.

    Best regards,

    Xudong Peng


    If the answer is the right solution, please click "Accept Answer" and kindly upvote. If you have extra questions about this answer, please click "Comment". Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Van Minh Ngo 0 Reputation points
    2024-01-19T09:56:15.9966667+00:00

    You should try to change Port in Project Url for IIS Express in {Project File}->Properties -> Right click to Project File( example with ShopMobile here) then choose Properties... At Project Url in Web tab , try to change Port to another Port ( can increase by 1 )then click "Create Virtual Direction" then Ctrl + S. Done! Run the application again to see if it work. User's imageUser's image

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.