Okey so I have an ASP.NET app which I've put in the web tabs in Salesforce in classic view everything is fine the service url works. However, when I open the tab in the lightning experience the url in the browser is different but in the app I still get the one from classic view. Can anyone tell how to get the classic view url when in classic view and the lightning view url when in lightning experience.

  • Is your ASP.NET application hosted in Salesforce as a Canvas App or an older iframed composite web app tab? E.g. Is your app getting the Session ID and Server URL in the querystring. Mar 2, 2017 at 18:45
  • It is hosted as a web app i think i get session Id and server URL in he querystring
    – Givko
    Mar 3, 2017 at 20:22
  • Can you update your question with example URLs that you are expected? I'd expect the URL passed off to the app to be consistent. Mar 7, 2017 at 22:28

1 Answer 1


I found a solution to my problem. The solution is that salesforce have an exact pattern to which they form lightning URLs which is the following https://[instance].lightning.force.com/ so what i came up with is that I get the instance from the classing url I have and replace is the template and everything worked out fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.