This post is a contribution from Raghavendra B Nanjaiah, an engineer with the SharePoint Developer Support team.
Just wanted to publish this post provided the steps to publish a LightSwitch App to SharePoint On-Premises environment. Hope you will find this useful.
Section 1: Create issuer ID (same as high-trust app)
1. Check if any previously registered SPTrustedSecurityTokenIssue exists. If there’s a malfunctioning one and if – IsTrustBroker switch was used, it means the bad token issuer might be getting called. If this is the first time you are configuring high-trust apps then you can skip steps a & b below.
a. Run Get-SPTrustedSecurityTokenIssuer. If no Azure workflow is configured this command should return empty. If you get any issuer apart from workflow, run below script to delete it.
b. Remove-SPTrustedSecurityTokenIssuer (pass Id value from output of the above command).
2. Create a new SPTruestedSecurityTokenIssuer by running below script, passing your SharePoint Developer site URL and Cert path (.cer) that you will use to sign the token (you need to create a self-signed cert). For more information see: http://msdn.microsoft.com/en-us/library/fp179901.aspx .
Take a note of the $issuerId = “447f40c6-99df-4d37-9739-5370102489f7” from the below script. We’ll be using it later.