Quantcast
Channel: AutoSPInstaller
Viewing all articles
Browse latest Browse all 2279

Commented Issue: Change "Stop-DefaultWebsite" function logic [22232]

$
0
0
If you removed "Default Web Site" prior to setup SharePoint farm, then "SharePoint Web Services" will have an ID = 1.
When you try to provision first Web App, "SharePoint Web Services" site stopped and you're end up with AccessDenied exception because of STS is not available.

Please remove condition of trying to get Default Web Site by ID = 1:
change line
* $defaultWebsite = Get-Website | Where-Object {$_.Name -eq "Default Web Site" -or $_.ID -eq 1 -or $_.physicalPath -eq "%SystemDrive%\inetpub\wwwroot"}
to
* $defaultWebsite = Get-Website | Where-Object {$_.Name -eq "Default Web Site" -or $_.physicalPath -eq "%SystemDrive%\inetpub\wwwroot"}
Comments: ** Comment from web user: noral **

The error is tricky too -
```
System.UnauthorizedAccessException:
<nativehr>0x80070005</nativehr><nativestack></nativestack>Access denied.
```
It took me some time to figure out that __SharePoint Web Services__ was stopped in IIS.

Thank you @loknar777!


Viewing all articles
Browse latest Browse all 2279

Trending Articles