ChatChat| Needs HelpQuestions? | E-Mail UsEmail Us
Garage Sale| Manage Account | Login | Register | Search Members
Search Blogs
Add a Blog Sort Blogs  by     in    order

display   items per page
Records Found! There are 1 blogs found.
 
Thursday, July 11, 2019 8:59:03 PM Click if you like this blog.2 Likes Click if you do not like this blog.1 Dislikes

How to redirect http to https on your asp.net web application

How to redirect http to https on your asp.net web application
By:  SolanMa
Country:  United States
The fastest and easiest way to redirect http to https is to add this script below under the Application_BeginRequest section of your Global.asax file.

void Application_BeginRequest(object sender, EventArgs e)
{
if (!Request.IsSecureConnection)
{
string securePath = string.Format("https{0}", Request.Url.AbsoluteUri.Substring(4));
Response.Redirect(securePath);
}
}
Add/View Comments   Add comments
   Comments posted
Views   4,069  Views