Thursday 6 September 2018

The process cannot access the flie because it is being used by another process exception from HRESULT:0*80070020

Issue:-At times you may notice that one or more Web sites are not started in IIS 7.0. If you try to manually start the Web site, it may fail with the following error message:

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


Environment:-Windows 2012R2 server

Error Cause:-The error code 0x80070020 translates to ERROR_SHARING_VIOLATION (The process cannot access the file because it is being used by another process.)

This issue may occur if TCP port 80 and/or 443 is grabbed by a different service.

Solution:-First check to see what is listening on port 80.
                Open a command prompt and enter the following command:

                 netstat -ano | find ":80"

 netstat -aon | find ":443"
  
  In this case process ID 4228 was listening on port 80.
                  To check what this process is open task manager and locate that PID.
  (Note you may need to select View -> Select columns -> PID first).

 1.It turns out a developer installed Apache which was listeningon port 80 and
    causing a conflict.To resolve the conflict change one service to run on a different
    port or uninstall the unnecessary web server.
 2.In Task bar we can select httpd.exe running on  port 80 and end process

Now you can start and stop IIS website.




Thanks,
Aditya.

No comments:

Post a Comment