Tuesday, March 23, 2010

IIS Error: The process cannot access the file because it is being used by another process.

Recently in our one of the web servers all the sites using port 80 were stopped and when we tried to restart website it was giving error like process cannot access the file because it is being used by another process. After analyzing and diagnosis and searching on internet for the same problem i have found that it was a problem due to port 80 was used by another process. To solve the problem i have following command which will list IPs,PID(Process ID) and port that used by the process. The command is as below.

After running that command in command in command prompt it will give output like following.

IIS Error, IIS 6.0, IIS 7.0

From that output you can fine which port is used by which PID(Process Id). And then you can find the process from task manager. Process Id column in task manager is not enabled by default so you can do by View Menu->Select Column a following dialog box will appear.


Select PID (Process Identifier) and press OK.Now process Id will appear in task manager and in task manger go to processes tab where you can find out process by checking process id column then select that process right click->click End Process that will kill that process. Now again try to restart the IIS Site it will restart. In my case it was java updater who is using same port 80 and after killing my IIS Sites were ok. Hope this will help you..

Technorati Tags: ,

Shout it
kick it on DotNetKicks.com


  1. when i run asp program with IIS software I had an error numbered 2147467259. how can i rectify it?

  2. Thanks for your article. It sorted out my problem. Seems something was blocking the Skype default port, so it fell back to port 80 which stopped IIS

  3. on my system it was system that use port 80 and Teamviewer using port 443. Had to restart the server as it is difficult to close teamviewer remotely and stayed logged in :-)
    your aticle was very helpful, esp. adding the PID Column

  4. Thanks for helping via posting this article.
    Issue : ISS 7 , "The process cannot access the file because it is being used by another process." when restarting one of the Virtual Website.
    Solution : As suggested in the article, a) identify the port of the wesbite b) use netstat -ano to list the processes which uses that port c) go to taskmgr and kill that process, if not required or if it is some unnecessary s\w holding that prot, uninstall it. (In my case, it was VisualSVNServer and I uninstalled it and restart Virtual Website worked !)


Your feedback is very important to me. Please provide your feedback via putting comments.

Support this blog-Buy me a coffee

Buy me a coffeeBuy me a coffee
Search This Blog
Subscribe to my blog


My Mvp Profile
Follow us on facebook
Blog Archive
Total Pageviews