SOLVED

IIS Extension not working immediately after install - 401 Unauthorized

%3CLINGO-SUB%20id%3D%22lingo-sub-1742590%22%20slang%3D%22en-US%22%3EIIS%20Extension%20not%20working%20immediately%20after%20install%20-%20401%20Unauthorized%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1742590%22%20slang%3D%22en-US%22%3E%3CP%3EI%20just%20installed%20IIS%20Extension%20via%20Windows%20Admin%20Center.%20When%20I%20open%20the%20IIS%20extension%20within%20Windows%20Admin%20Center%20I%20get%20an%20error%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%22%3CSPAN%3EUnknown%20error%20has%20occurred%20when%20trying%20to%20initialize%20Web%20Server%20Module%3A%20%22The%20remote%20server%20returned%20an%20error%3A%20(401)%20Unauthorized.%22%3C%2FSPAN%3E%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20checked%20the%26nbsp%3BC%3A%5CProgram%20Files%5CIIS%20Administration%5C2.3.0%5CMicrosoft.IIS.Administration%5Cconfig%5Cappsettings.json%20has%20'IIS%20Administration%20API%20Owners'%20group%20listed%2C%20the%20group%20exists%20on%20my%20machine%2C%20I'm%20in%20the%20group%2C%20I'm%20an%20Administrator%20on%20my%20machine.%20My%20machine%20is%20running%20Win%20Version%2010.0.19042%20Build%2019042.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EErrors%20from%20console%20are%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%60%60%60%3C%2FP%3E%3CP%3EaddStyles.js%3A368%20Refused%20to%20load%20the%20stylesheet%20'%3CA%20href%3D%22https%3A%2F%2Ffonts.googleapis.com%2Ficon%3Ffamily%3DMaterial%2BIcons%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Ffonts.googleapis.com%2Ficon%3Ffamily%3DMaterial%2BIcons%3C%2FA%3E'%20because%20it%20violates%20the%20following%20Content%20Security%20Policy%20directive%3A%20%22style-src%20'self'%20'unsafe-inline'%22.%20Note%20that%20'style-src-elem'%20was%20not%20explicitly%20set%2C%20so%20'style-src'%20is%20used%20as%20a%20fallback.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ezone.js%3A2969%20POST%20https%3A%2F%2Flocalhost%3A6516%2Fapi%2Fnodes%2Fpssfc07%2Ffeatures%2FpowershellApi%2Fpssessions%2F8e9dfe99-e44a-4906-87ec-856d943dd36c%2FinvokeCommand%3Fapi-version%3D2019-02-01%20400%20(Bad%20Request)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EERROR%20Error%3A%20Uncaught%20(in%20promise)%3A%20Unknown%20error%20has%20occurred%20when%20trying%20to%20initialize%20Web%20Server%20Module%3A%20%22The%20remote%20server%20returned%20an%20error%3A%20(401)%20Unauthorized.%22%3CBR%20%2F%3Eat%20resolvePromise%20(zone.js%3A814)%3CBR%20%2F%3Eat%20resolvePromise%20(zone.js%3A771)%3CBR%20%2F%3Eat%20zone.js%3A873%3CBR%20%2F%3Eat%20ZoneDelegate.push..%2Fnode_modules%2Fzone.js%2Fdist%2Fzone.js.ZoneDelegate.invokeTask%20(zone.js%3A421)%3CBR%20%2F%3Eat%20Object.onInvokeTask%20(core.js%3A19821)%3CBR%20%2F%3Eat%20ZoneDelegate.push..%2Fnode_modules%2Fzone.js%2Fdist%2Fzone.js.ZoneDelegate.invokeTask%20(zone.js%3A420)%3CBR%20%2F%3Eat%20Zone.push..%2Fnode_modules%2Fzone.js%2Fdist%2Fzone.js.Zone.runTask%20(zone.js%3A188)%3CBR%20%2F%3Eat%20drainMicroTaskQueue%20(zone.js%3A595)%3CBR%20%2F%3Eat%20ZoneTask.push..%2Fnode_modules%2Fzone.js%2Fdist%2Fzone.js.ZoneTask.invokeTask%20%5Bas%20invoke%5D%20(zone.js%3A500)%3CBR%20%2F%3Eat%20invokeTask%20(zone.js%3A1540)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ecore.js%3A17901%20ERROR%20Error%3A%20Uncaught%20(in%20promise)%3A%20The%20remote%20server%20returned%20an%20error%3A%20(401)%20Unauthorized.%3CBR%20%2F%3Eat%20resolvePromise%20(zone.js%3A814)%3CBR%20%2F%3Eat%20resolvePromise%20(zone.js%3A771)%3CBR%20%2F%3Eat%20zone.js%3A873%3CBR%20%2F%3Eat%20ZoneDelegate.push..%2Fnode_modules%2Fzone.js%2Fdist%2Fzone.js.ZoneDelegate.invokeTask%20(zone.js%3A421)%3CBR%20%2F%3Eat%20Object.onInvokeTask%20(core.js%3A19821)%3CBR%20%2F%3Eat%20ZoneDelegate.push..%2Fnode_modules%2Fzone.js%2Fdist%2Fzone.js.ZoneDelegate.invokeTask%20(zone.js%3A420)%3CBR%20%2F%3Eat%20Zone.push..%2Fnode_modules%2Fzone.js%2Fdist%2Fzone.js.Zone.runTask%20(zone.js%3A188)%3CBR%20%2F%3Eat%20drainMicroTaskQueue%20(zone.js%3A595)%3CBR%20%2F%3Eat%20ZoneTask.push..%2Fnode_modules%2Fzone.js%2Fdist%2Fzone.js.ZoneTask.invokeTask%20%5Bas%20invoke%5D%20(zone.js%3A500)%3CBR%20%2F%3Eat%20invokeTask%20(zone.js%3A1540)%3C%2FP%3E%3CP%3E%60%60%60%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20tips%3F%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

I just installed IIS Extension via Windows Admin Center. When I open the IIS extension within Windows Admin Center I get an error

 

"Unknown error has occurred when trying to initialize Web Server Module: "The remote server returned an error: (401) Unauthorized.""

 

I've checked the C:\Program Files\IIS Administration\2.3.0\Microsoft.IIS.Administration\config\appsettings.json has 'IIS Administration API Owners' group listed, the group exists on my machine, I'm in the group, I'm an Administrator on my machine. My machine is running Win Version 10.0.19042 Build 19042. 

 

Errors from console are: 

 

```

addStyles.js:368 Refused to load the stylesheet 'https://fonts.googleapis.com/icon?family=Material+Icons' because it violates the following Content Security Policy directive: "style-src 'self' 'unsafe-inline'". Note that 'style-src-elem' was not explicitly set, so 'style-src' is used as a fallback.

 

zone.js:2969 POST https://localhost:6516/api/nodes/pssfc07/features/powershellApi/pssessions/8e9dfe99-e44a-4906-87ec-856d943dd36c/invokeCommand?api-version=2019-02-01 400 (Bad Request)

 

ERROR Error: Uncaught (in promise): Unknown error has occurred when trying to initialize Web Server Module: "The remote server returned an error: (401) Unauthorized."
at resolvePromise (zone.js:814)
at resolvePromise (zone.js:771)
at zone.js:873
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)
at Object.onInvokeTask (core.js:19821)
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:420)
at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:188)
at drainMicroTaskQueue (zone.js:595)
at ZoneTask.push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask [as invoke] (zone.js:500)
at invokeTask (zone.js:1540)

 

core.js:17901 ERROR Error: Uncaught (in promise): The remote server returned an error: (401) Unauthorized.
at resolvePromise (zone.js:814)
at resolvePromise (zone.js:771)
at zone.js:873
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)
at Object.onInvokeTask (core.js:19821)
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:420)
at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:188)
at drainMicroTaskQueue (zone.js:595)
at ZoneTask.push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask [as invoke] (zone.js:500)
at invokeTask (zone.js:1540)

```

 

Any tips? 

1 Reply
Highlighted
Best Response confirmed by roryk (New Contributor)
Solution
Well, a restart fixed this. If it's necessary after extension installation it'd be good to make that clear. Or perhaps I just missed it?