Showing posts with label iis. Show all posts
Showing posts with label iis. Show all posts

Friday, 27 April 2012

Couldn't start Default Web Site on Windows7. Solved

Problem:
You try to start Default Web Site in IIS Manager and it fails with the following error message:


The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020)


Solution: 
If Skype is running - quit it. Then start the web site! Your Skype was listening on the port 80.

Hint:
Start the Default Web Site before starting Skype.

Happened to me on Windows7 64bit, IIS7, IIS7.5











Friday, 24 June 2011

Resetting identity on web application pool from the command line

Ever wondered how to work with web application pools in IIS6 or IIS7 from the command line? See example below - it will (re)assign specific windows account for selected web application pool

SET SERVUSER=%COMPUTERNAME%\MyUser
SET SRVUSERPWD=PasswordHere
SET APPPOOLNAME=MyWebPool


echo will work for IIS6
CSCRIPT %SYSTEMDRIVE%\Inetpub\AdminScripts\ADSUTIL.VBS SET w3svc/AppPools/%APPPOOLNAME%/WamUserName "%SERVUSER%"
CSCRIPT %SYSTEMDRIVE%\Inetpub\AdminScripts\ADSUTIL.VBS SET w3svc/AppPools/%APPPOOLNAME%/WamUserPass "%SRVUSERPWD%"

echo will work for IIS7
%windir%\system32\inetsrv\appcmd set config /section:applicationPools /[name='%APPPOOLNAME%'].processModel.identityType:SpecificUser /[name='%APPPOOLNAME%'].processModel.userName:%SERVUSER% /[name='%APPPOOLNAME%'].processModel.password:%SRVUSERPWD%