Thursday 8 May 2014

An exception occurred when trying to issue security token: There was no endpoint listening SharePoint 2013

Recently I got stuck with the below issue while publishing workflow. When I checked the Event viewer got the following Error.

"An exception occurred when trying to issue security token: There was no endpoint listening athttp://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc/actas that could accept the message. This is often caused by an incorrect address or SOAP action ."
The issue is generally caused by the service application is not provision, and the application pool for the service application is not running.
To fix the issue, please follow these steps:
  1. Open Internet Information Manager(IIS)
  2. Go to "Application Pools"
  3. Select "SecurityTokenServiceApplicationPool", ensure its status is "Start".
  4. After that, open "SharePoint 2013 Management Shell". Run the following command:
     
    $sts = Get-SPServiceApplication | ?{$_ -match "Security"}
    $sts.Status
    $sts.Provision()
      
  5. Do IISReset

How to save Publishing Site as template SharePoint 2013

SharePoint doesn’t support saving publishing sites as a template. But there is an easy way to save the template of a publishing site in SharePoint 2013 . The steps are as below.

1.Deactivate the Publishing feature of the site.
2. Open the site in SharePoint Designer 2013.
3. In SharePoint Designer, under Sites tab select “Site Options” (see screen below)
4. Find 'SaveSiteAsTemplateEnabled' in Site Options (see below). 
5. Click on Modify button and change value “true”.

6. Now you can find 'Save site as template' Option under Site Settings (http://sitename/_layouts/15/settings.aspx) and create the template.
7. Your template is saved under solution gallery(/_catalogs/solutions/Forms/AllItems.aspx)