0xC00CEF03, <assemblyBinding> and IIS 8 or 10
If you've ever come across Exception from HRESULT: 0xC00CEF03 when making configuration changes in IIS Manager (inetmgr.exe
) or via appcmd.exe
for IIS 8, 8.5, or 10, please check whether there is an <asm:assemblyBinding>
section in your web.config
.
The namespaced tag <asm:*>
is the source of the problem, which ceases working since IIS 8, to fix this, you may
-
Remove the namespace:
That is, change
<asm:*>
to<*>
, andxmlns:asm
toxmlns
.For example, change this
<?xml version="1.0" encoding="utf-8"?> <configuration> <runtime> <asm:assemblyBinding xmlns:asm="urn:schemas-microsoft-com:asm.v1"> <asm:dependentAssembly> <asm:assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> <asm:bindingRedirect oldVersion="4.5.0.0-9.0.0.0" newVersion="9.0.0.0" /> </asm:dependentAssembly> </asm:assemblyBinding> </runtime> </configuration>
to
<?xml version="1.0" encoding="utf-8"?> <configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> <bindingRedirect oldVersion="4.5.0.0-9.0.0.0" newVersion="9.0.0.0" /> </dependentAssembly> </assemblyBinding> </runtime> </configuration>
-
Or edit
web.config
manually.
References:
- iis 8 - Under IIS 8.0, appcmd or inetmgr cannot make changes to web.config if <runtime>/<assemblyBinding> element is present in the file - Stack Overflow
- Under IIS 8.0, appcmd or inetmgr cannot make changes to web.config if <runtime>/<assemblyBinding> element is present in the file : The Official Microsoft IIS Forums