Error Starting IIS Express Web Server - Error 0x80070020

-1

After leaving Visual Studio one night in debug mode stopped on one line, I could no longer run the web application locally because of an error in IIS Express . I tried to stop IIS Express and reopen Visual Studio, but it did not work.

    
asked by anonymous 22.06.2016 / 22:53

1 answer

1

As this post of a blog:

  

The code error 0x80070020 means ERROR_SHARING_VIOLATION , which in the case of IIS Express (or IIS ) means that the port that IIS is trying to listen to is being used by another process. >

To find out which application is using the port, just run the command netstat on cmd with the following syntax: netstat -ao | findstr número_da_porta_que_está_pesquisando

  

The a parameter is responsible for displaying all connections and ports heard.   The o parameter is responsible for displaying the process ID associated with the connection.

Running the above command:

C:\Users\Daniel>netstat -ao | findstr 49286
TCP    [::1]:49286            Daniel:49286           ESTABLISHED     4280

After finding the process ID, which is displayed in the last column of the command return, just search its name using tasklist :

C:\Users\Daniel>tasklist /FI "PID eq 4280"
Image Name                     PID Session Name        Session#    Mem Usage
========================= ======== ================ =========== ============
firefox.exe                   4280 Console                    1    601.012 K

Or you can join kill process with taskkill :

C:\Users\Daniel>taskkill /PID 4280
    
22.06.2016 / 22:53