iisreset
, despite being an Enterprise Admin and part of the local Administrators group, typically occurs due to elevated permission mismatches, misconfigured UAC policies, or service-specific restrictions. Here's how you can resolve this and regain proper control over IIS.iisreset
Access Denied and Permissions IssuesERROR (hresult:80070005, message: Command execution failed Access is denied)
from the appcmd restore backup
command usually indicates permission issues, even though you’re running CMD as an administrator. This could happen due to:appcmd restore backup
%windir%\System32\inetsrv\backup
C:\Windows\System32\inetsrv\backup
Administrators
manually:Administrators
.appcmd
command.bash
appcmd restore backup "backupname"
appcmd
might fail.bash
net start W3SVC
net start WAS
appcmd restore backup
command:bash
appcmd restore backup "backupname"
C:\Windows\System32\inetsrv\backup\<backupname>
applicationHost.config
metaBase.xml
(if IIS 6 compatibility is enabled).bash
appcmd restore backup "backupname"
appcmd
. C:\Windows\System32\inetsrv\backup\<backupname>
applicationHost.config
: C:\Windows\System32\inetsrv\config\applicationHost.config
<backupname>
.bash
iisreset
iisreset
, despite being an Enterprise Admin and part of the local Administrators group, typically occurs due to elevated permission mismatches, misconfigured UAC policies, or service-specific restrictions. Here's how you can resolve this and regain proper control over IIS.iisreset
Access Denied and Permissions Issuesbash
iisreset
iisreset
, also depend on privileges specific to IIS Admin access.bash
compmgmt.msc
Local Users and Groups > Groups > Administrators
C:\Windows\System32\inetsrv
C:\inetpub
iisreset
command interacts directly with the Windows Process Activation Service (WAS) and other IIS services. Permissions to control these services are sometimes bound to the IIS_IUSRS group.bash
net localgroup IIS_IUSRS <YourUsername> /add
iisreset
:bash
iisreset
iisreset
might fail.bash
net start
World Wide Web Publishing Service (W3SVC)
Windows Process Activation Service (WAS)
bash
net start W3SVC
net start WAS
iisreset
.secpol.msc
). Security Settings > Local Policies > Security Options
iisreset
. C:\Windows\System32\inetsrv\config
applicationHost.config
to a backup location.bash
compmgmt.msc
bash
compmgmt.msc
iisreset
.eventvwr.msc
).bash
compmgmt.msc
bash
compmgmt.msc
bash
compmgmt.msc
iisreset
or appcmd
still fails, additional logs or error codes will help refine the solution. iisreset /stop /timeout:60
command is a workaround for IIS 7's known quirks where the standard iisreset
command may hang or fail due to delayed stopping of dependent services such as WAS or W3SVC./timeout
flag, the command waits appropriately for services to stop before reporting success or failure. IIS 7 sometimes times out prematurely, causing issues like errors or Access Denied
./timeout:60
Works/timeout
, these services might still be shutting down when the system assumes failure.iisreset /stop /timeout:60
works, here’s what you can do to ensure IIS runs smoothly moving forward:bash
net start
W3SVC
(World Wide Web Publishing Service)WAS
(Windows Process Activation Service)bash
net stop W3SVC
net stop WAS
bash
net start WAS
net start W3SVC
iisreset
Command Timing/timeout
is still needed for iisreset
, you can add it to your working process to ensure stability:bash
iisreset /stop /timeout:60
bash
iisreset /start
bash
iisreset /restart /timeout:60
eventvwr.msc
).bash
dism /online /cleanup-image /restorehealth
bash
appcmd restore backup "backupname"
appcmd restore backup
, this means the read permissions during restoration (which involve overwriting existing IIS configuration files) are limited or blocked. This discrepancy between backing up and restoring usually occurs due to restricted write permissions or locked configuration files.appcmd restore backup
applicationHost.config
in its system location. Improper folder or file permissions are a common cause of issues. C:\Windows\System32\inetsrv\backup
backup
):applicationHost.config
, etc.):C:\Windows\System32\inetsrv\backup\YourBackupName
).bash
appcmd restore backup "backupname"
appcmd
may encounter access issues due to UAC or service-level permissions.bash
appcmd restore backup "backupname"
bash
net stop W3SVC
net stop WAS
bash
appcmd restore backup "backupname"
bash
net start WAS
net start W3SVC
bash
appcmd restore backup "backupname"
appcmd restore backup
continues to fail, manually override and replace the IIS configuration files from the backup. C:\Windows\System32\inetsrv\backup\YourBackupName\
C:\Windows\System32\inetsrv\Config\applicationHost.config
applicationHost.config
bash
appcmd restore backup "backupname"
bash
appcmd restore backup "backupname"
eventvwr.msc
).bash
appcmd restore backup "backupname"
bash
appcmd restore backup "backupname"
bash
appcmd restore backup "backupname"
bash
appcmd restore backup "backupname"
appcmd
:bash
appcmd restore backup "backupname"
appcmd restore backup
causes the World Wide Web Publishing Service (W3SVC) to stop, it indicates a deeper configuration conflict or corruption during the restoration process. The service abruptly stopping suggests that the restored configuration might have invalid elements or permissions issues, which ISAPI filters, custom modules, or corrupt applicationHost.config
files could trigger. C:\Windows\System32\inetsrv\backup\<backupname>
applicationHost.config
in a text editor (like Notepad or Notepad++).<system.webServer>
or <modules>
).<site>
pointing to non-existent directories).<sites>
defined for core IIS sites (if critical to restore).<modules>
or <isapiFilters>
entries that might trigger crashes.applicationHost.config
backup might look like:xml
<configuration>
<system.applicationHost>
<sites>
<site name="Default Web Site" id="1">
<application path="/" applicationPool="DefaultAppPool">
<virtualDirectory path="/" physicalPath="C:\inetpub\wwwroot" />
</application>
</site>
</sites>
<applicationPools>
<add name="DefaultAppPool" />
</applicationPools>
</system.applicationHost>
</configuration>
bash
appcmd restore backup "backupname"
bash
net start W3SVC
W3SVC
, IIS
, or WAS
(Windows Activation Service).bash
appcmd list apppool
DefaultAppPool
exists and is functional (repair if necessary):bash
appcmd add apppool /name:"DefaultAppPool"
bash
appcmd list site
bash
iisreset
W3SVC
when included in a restored configuration.applicationHost.config
file.<modules>
:xml
<modules>
<!-- Temporarily remove problematic modules -->
<add name="CustomModule" />
</modules>
bash
appcmd restore backup "backupname"
iisreset
xml
<configuration>
<system.applicationHost>
<sites>
<site name="Default Web Site" id="1">
<application path="/" applicationPool="DefaultAppPool">
<virtualDirectory path="/" physicalPath="C:\inetpub\wwwroot" />
</application>
</site>
</sites>
<applicationPools>
<add name="DefaultAppPool" />
</applicationPools>
</system.applicationHost>
</configuration>
SYSTEM
Administrators
xml
<configuration>
<system.applicationHost>
<sites>
<site name="Default Web Site" id="1">
<application path="/" applicationPool="DefaultAppPool">
<virtualDirectory path="/" physicalPath="C:\inetpub\wwwroot" />
</application>
</site>
</sites>
<applicationPools>
<add name="DefaultAppPool" />
</applicationPools>
</system.applicationHost>
</configuration>
xml
<configuration>
<system.applicationHost>
<sites>
<site name="Default Web Site" id="1">
<application path="/" applicationPool="DefaultAppPool">
<virtualDirectory path="/" physicalPath="C:\inetpub\wwwroot" />
</application>
</site>
</sites>
<applicationPools>
<add name="DefaultAppPool" />
</applicationPools>
</system.applicationHost>
</configuration>
<sites>
, <appPools>
) into the new applicationHost.config
.W3SVC
errors.xml
<configuration>
<system.applicationHost>
<sites>
<site name="Default Web Site" id="1">
<application path="/" applicationPool="DefaultAppPool">
<virtualDirectory path="/" physicalPath="C:\inetpub\wwwroot" />
</application>
</site>
</sites>
<applicationPools>
<add name="DefaultAppPool" />
</applicationPools>
</system.applicationHost>
</configuration>
.NET Framework
, IIS extensions, or app pools.applicationHost.config
) to ensure it is clean and valid.appcmd
attempts to overwrite files in IIS directories. Since the issue persists even with a new, valid backup of the Default Website, we can eliminate corruption in the backup file itself and focus on permissions, locks, or restrictive policies.W3SVC
or WAS
are actively running, locking key files like applicationHost.config
.bash
net stop W3SVC
net stop IISADMIN
net stop WAS
bash
appcmd restore backup "backupname"
bash
net start WAS
net start W3SVC
appcmd
from writing updated configuration files. You may be missing write access to key files/folders like applicationHost.config
during the restore. C:\Windows\System32\inetsrv\config
applicationHost.config
file > Properties > Security tab.C:\Windows\System32\inetsrv\config
).bash
appcmd restore backup "backupname"
bash
appcmd restore backup "backupname"
applicationHost.config
w3wp.exe
or inetinfo.exe
).bash
appcmd restore backup "backupname"
appcmd restore backup
consistently fails despite correct permissions, manually apply the backup configuration. C:\Windows\System32\inetsrv\backup\<backupname>
C:\Windows\System32\inetsrv\config
:applicationHost.config
file to a backup directory.applicationHost.config
from <backupname>
.bash
net start WAS
net start W3SVC
bash
appcmd restore backup "backupname"
IISADMIN
, W3SVC
, or applicationHost.config
.WAS
(Windows Process Activation Service) is stuck because dependent services like Net.Pipe Listener Adapter, Net.TCP Listener Adapter, or Net.Tcp Port Sharing Service are in a "stuck starting" state, this is preventing WAS (and likely W3SVC) from stopping cleanly. These services are interdependent, and a failure in one can cascade to the others.net stop
isn’t working, forcefully terminate them.bash
sc queryex type= service state= all
NetPipeActivator
NetTcpActivator
NetTcpPortSharing
bash
taskkill /pid <PID> /f
bash
taskkill /pid 12345 /f
bash
net stop WAS
bash
sc config NetPipeActivator start= demand
sc config NetTcpActivator start= demand
sc config NetTcpPortSharing start= demand
sc config WAS start= demand
bash
sc qc NetPipeActivator
sc qc NetTcpActivator
sc qc NetTcpPortSharing
bash
net start NetPipeActivator
net start NetTcpActivator
net start NetTcpPortSharing
net start WAS
bash
dism /online /enable-feature /featurename:NetFx4 /all
dism /online /enable-feature /featurename:NET-WCF-Services45 /all
bash
dism /online /enable-feature /featurename:NET-WCF-TCP-Activation45
bash
sc config NetPipeActivator start= disabled
sc config NetTcpActivator start= disabled
sc config NetTcpPortSharing start= disabled
bash
taskkill /pid <PID> /f
bash
taskkill /pid <PID> /f
NetPipeActivator
NetTcpActivator
NetPipeActivator
NetTcpActivator
WAS
W3SVC
bash
taskkill /pid <PID> /f
bash
taskkill /pid <PID> /f
bash
taskkill /pid <PID> /f
bash
taskkill /pid <PID> /f
bash
taskkill /pid <PID> /f
bash
sc queryex NetMsmqActivator
bash
taskkill /pid <PID> /f
bash
taskkill /pid 12345 /f
bash
net stop WAS
bash
net stop MSMQ
bash
net start MSMQ
bash
net start NetMsmqActivator
bash
dism /online /enable-feature /featurename:MSMQ-Server /all
bash
dism /online /enable-feature /featurename:NET-WCF-MSMQ-Activation45 /all
bash
net start NetMsmqActivator
bash
taskkill /pid <PID> /f
bash
taskkill /pid <PID> /f
bash
taskkill /pid <PID> /f
bash
taskkill /pid <PID> /f
bash
taskkill /pid <PID> /f
bash
taskkill /pid <PID> /f
machine.config
or applicationHost.config
.bash
taskkill /pid <PID> /f
bash
taskkill /pid <PID> /f
eventvwr.msc
.NetMsmqActivator
).bash
taskkill /pid <PID> /f
bash
taskkill /pid <PID> /f
taskkill
.dism /enable-feature
).NetMsmqActivator
service if corruption is causing the issue.appcmd restore backup
). Let me know the outcome or if other new errors appear—we’ll refine from there!