SyntaxFix
Write A Post
Hire A Developer
Questions
Try this:
string callbackurl = Request.Url.Host != "localhost" ? Request.Url.Host : Request.Url.Authority;
This will work for local as well as production environment. Because the local uses url with port no that is possible using Url.Host.