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.
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.