Monday, October 27, 2014

System.Net.WebException: The remote server returned an error: (503) Server Unavailable.

This issue comes when there is some issue with SecurityTokenServiceApplication

Run the following command on Powershell and the issue will be resolved

Add-PSSnapin "Microsoft.SharePoint.Powershell"

$h = Get-SPServiceHostconfig

$h.Provision()

$services = Get-SPServiceApplication

foreach ($service in $services) { $service.provision();
write-host $service.name}


If you have any issues in executing this commands,copy paste the above powershell script lines and create a .ps1 file and execute the .ps1 file
Example :

STS.ps1

Add-PSSnapin "Microsoft.SharePoint.Powershell"

$h = Get-SPServiceHostconfig

$h.Provision()

$services = Get-SPServiceApplication

foreach ($service in $services) { $service.provision();
write-host $service.name}

powershell –noexit



Run powershell as admin – Location for your PS1 file and name of PS1 file

It will be something like this PS

 C:\Windows\system32> C:\Users\jiniv\\Desktop\STS.ps1


More Details and Reference from
                    

No comments:

Post a Comment