Hi to all
Below code i used redirect the URL http to https:
http://localhost:61775/WebForm1.aspx
to
https://localhost:61775/WebForm1.aspx
But,it is not working in Local machine.
if (!Request.IsLocal && !Request.IsSecureConnection)
{
var ub = new UriBuilder(Request.Url);
ub.Scheme = Uri.UriSchemeHttps;
ub.Port = -1; // use default port for scheme
Response.Redirect(ub.Uri.ToString(), true);
return;
}
Regards
Saravana