Error:

Failed to register URL “http://localhost:XXXX/” for site “SITE NAME” application “/”. Error description: The process cannot access the file because it is being used by another process. (0x80070020)

**XXXX = port number

Reason for this error:

This error happens to me because I was using same solution for different project. I copied the solution and created another one in different location.

I have done several another projects in same way, however, I didn’t face this error earlier. I think, the localhost with the port has been researved for the previous actual solution. Since I created seperate project in TFS and then clone the solution local location with same solution name in different location.

Resolution:

Solutions Explorer

Right click on project select Unload project

Again Right click and select Edit ProjectName.csproj

remove these 3 lines

<DevelopmentServerPort>0</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:62940/</IISUrl>

Save and reload the project

Then, you will get new port for the project.

If you find any another solution, please comment.

By Rijwan Ansari

Research and Technology Lead | Software Architect | Full Stack .NET Expert | Tech Blogger | Community Speaker | Trainer | YouTuber. Follow me @ https://rijsat.com Md Rijwan Ansari is a high performing and technology consultant with 10 plus years of Software Development and Business Applications implementation using .NET Technologies, SharePoint, Power Platform, Data, AI, Azure and cognitive services. He is also a Microsoft Certified Trainer, C# Corner MVP, Microsoft Certified Data Analyst Associate, Microsoft Certified Azure Data Scientist Associate, CSM, CSPO, MCTS, MCP, with 15+ Microsoft Certifications. He is a research and technology lead in Tech One Global as well as leading Facebook community Cloud Experts Group and SharePoint User Group Nepal. He is a active contributor and speaker in c-sharpcorner.com community, C# Corner MVP and his rank at 20 among 3+ millions members. Additionally, he is knee to learn new technologies, write articles, love to contribute to the open-source community. Visit his blog RIJSAT.COM for extensive articles, courses, news, videos and issues resolution specially for developer and data engineer.

One thought on “Failed to register URL “http://localhost:XXXX/” for site “..” application “/”. Error description: The process cannot access the file because it is being used by another process. (0x80070020)”
  1. Spot on with this write-up, I seriously feel this amazing site needs a great
    deal more attention. I’ll probably be back again to read through more, thanks for the information!

Leave a Reply

Your email address will not be published.