Friday, October 16, 2009

The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020) – IIS 7 – Internet Information Se

In IIS7 I was trying to start my Default Web Site and was getting the following error screen.
IIS - Skype - Error
The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020)
A quick Google search turned up the following Microsoft Support Topic. Ok. Lets take a look at netstat and see what might be causing problems. Open a command prompt ([Windows Key + R] and enter cmd) and enter the command. After running netstat -ano, I noticed that there was indeed another process (with a process id of 796) accessing port 80. (You can enter netstat /? to see what the –ano flags are doing.)
netstat
The offending process that is using port 80 has a process id of 796. Now, how to find out what that process 796 is?
Using the tasklist command will show a list of all processes running in windows. You can use the /fi flags to filter the results. In this case I’m using a filter that will only show processes with a PID that equals 796. tasklist /fi “PID eq 796”
Tasklist Filter Command
The process with process id is Skype. Makes sense that it would be using port 80. I promptly closed down Skype and was then able to start my Default Web Site in IIS Manager. Hope this helps someone.

21 comments:

  1. oh, and I would recommend using TcpView to find out what applications have ports open

    ReplyDelete
  2. Anonymous1:49 PM

    Aaaaaaaaaaaaaaargh. *pound*head*on*table* Er, thanks.

    ReplyDelete
  3. Awesome work man. I was facing the same problem, Now i solve it..

    ReplyDelete
  4. Thanks a lot!. I had the same issue and worked at once.

    ReplyDelete
  5. Anonymous1:28 AM

    thanks it worked!!!!
    you are awesome!.

    ReplyDelete
  6. Thanks, you are a champ!

    ReplyDelete
  7. Anonymous7:30 AM

    Thanks!

    ReplyDelete
  8. Anonymous2:15 AM

    Thank you =)

    ReplyDelete
  9. Anonymous11:52 PM

    netstat -aon | find ":80"

    ReplyDelete
  10. Extremely useful, thanks Paul Fox

    ReplyDelete
  11. Anonymous6:49 PM

    Skype has an option in the Advanced options to use port 80 to get around firewalls. Disable that and it shouldn't happen again!

    ReplyDelete
  12. Anonymous9:59 AM

    OK, so I have a problem. I don't have skype, and the only process listening on port 80 is the system process. I have other IIS sites running without a problem. Only when I go to start my asp.net site does it give me problems. Any ideas?

    ReplyDelete
  13. Can't think of anything else that might be causing this specific error if not the conflict with Skype. Wish I could be of more help, but it would be difficult without more specific about your environment/configuration.

    Good luck in your search though.

    ReplyDelete
  14. Thanks.. very helpful ....
    Bakht Ali

    ReplyDelete
  15. had seemingly same problem trying to install the new launcher for Lineage 2 (as in same error)

    -5006 : 0x80070020

    ReplyDelete
  16. Sudhansu5:30 AM

    Thanks !!

    ReplyDelete
    Replies
    1. Anonymous11:51 PM

      For windows 8:
      tasklist /v /fi “PID eq 796”

      pubu

      Delete
  17. Thanks, Solved me the problem

    ReplyDelete
  18. Anonymous11:52 PM

    For windows 8:
    tasklist /v /fi “PID eq 796”

    pubu

    ReplyDelete
  19. Very helpful thanks. I just tried to explore it more. Find the below detail -

    Above error is coming because default port 8080 is not assigned to system. So default website under IIS manager is not able start.
    To Resolve the above error i followed the below steps, and it worked for me.

    Step 1 - Go to run, type cmd, command prompt will appear.

    Step 2 - We need to find which process is using the default port 8080. To find this type the below command in your command prompt. "Netstart -ano"

    Step 3 - As per above screen the port 8080 is using by the process 3152. Now we need to find which application is assigned for process id 3152.
    Type "tasklist /fi “PID eq 3152” in your command prompt and see the result.

    Step 4 - Start your default website in IIS manager. It will work.

    For more detail check the below link -
    http://vsstack.blogspot.in/2013/09/iis-hresult-0x80070020-process-cannot.html

    ReplyDelete