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.

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.

Thank You for usefull article but it seems that some extra steps should be performed before this configuration begins work. I have SP2013 farm on-premise and custom LS app deployed to IIS on the another server as You described above. I went through all
the steps You wrote. App work fine when I run it by F5 (It opens with URL https://localhost:44300/HTMLCLient/...). But it doesn't work when I install it on some site from app gallery. Redircting to
https://mysite.myorg.ru/MyApp/SharePointLaunch.aspx?... produces the ASP.NET error "Value cannot be null.
Parameter name: sharePointHostData" in the line 141 "SharePointHost sharePoint = application.SharePoint" of SharePointLaunchBase.cs according to NET.Reflector. Please point me to how to troubleshoot this error. Where does negotiation process between IIS and
SPFarm go wrong? Thank You