Chat
|
Needs
Help
|
E-Mail
Us
Home
Cards
|
Blogs
|
Poems
|
Gossips
|
Videos
|
Photos
|
Buy & Sell
Garage Sale
|
Manage Account
|
Login
|
Register
|
Search Members
Search
Blogs
Add a
Blog
Sort
Blogs
by
Category
Date Posted
Likes
DisLikes
Title
User Name
in
Ascending
Descending
order
display
10
25
50
100
250
500
items per page
There are
1
blogs found.
Thursday, July 11, 2019 8:59:03 PM
2
Likes
1
Dislikes
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 comments
Comments posted
4,069 Views