SOLVED

IIS Extension not working immediately after install - 401 Unauthorized

Copper 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? 

3 Replies
best response confirmed by roryk (Copper 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?

@roryk Restart what ? The server or an application? Thanks

@eliassal I'm pretty sure it was restarting the computer (my development laptop) ... but was a few months ago so I'm not 100% sure. 

1 best response

Accepted Solutions
best response confirmed by roryk (Copper 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?

View solution in original post