Roel Alblas
Roel Alblas

Reputation: 157

IIS virtual directories created by Visual Studio 16.8.4

When debugging in VS by IIS Express (Google Chrome), virtual directories are created. Sometimes I have an error like below:

Failed to register URL "http://localhost:60000/" for site "Floow.Admin.UI.Web(1)" application "/". Error description: The process cannot access the file because it is being used by another process. (0x80070020)

The step I take is changing the portnumber, so I can proceed.

But meanwhile I have a lot of these virtual directories. Can I delete the Virtual Directories somehow? I can't find them in IIS.

[EDIT]

This image is sometimes shown too and belongs to the issue.

enter image description here

[/EDIT]

Upvotes: 0

Views: 203

Answers (1)

samwu
samwu

Reputation: 5235

Error code 0x80070020 means ERROR_SHARING_VIOLATION, which in the case of IIS Express means that the port that it is attempting to listen on is being used by another process.

Use the netstat command to find out which application is using the port and then solve the problem.

netstat -ao | findstr <port_number_to_search_for>

The a parameter tells netstat to display all connections and listening ports.

The o parameter tells netstat to display the process ID associated with the connection.

Upvotes: 1

Related Questions