Hi
How to enable the ssl to the asp.net website and how to make changes to the asp.net code to access https://
Thanks
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Dorababu MekaRank #457 · 5.5K reputationPosted Jun 7, 2011, 12:17 AM EDT
In code you have to write the following in page_init
if (!Request.IsSecureConnection)
{
Response.Redirect(Request.Url.AbsoluteUri.ToLower().Replace("http://", "https://"), true);
}
and also add the following code in Page_Load
bool test = Request.IsSecureConnection;
if (!test)
{
Uri strQueryString = HttpContext.Current.Request.Url;
UriBuilder builder = new UriBuilder(strQueryString);
builder.Scheme = Uri.UriSchemeHttps;
builder.Port = 443;
Server.Transfer(builder.Uri.ToString());
}
SairamRank #5,130 · 310 reputationPosted Jun 7, 2011, 3:24 AM EDT
Can u help me how to configure asp.net website to ssl port..
when i tried it using self signed certificate shows error that "object not found"
by default the default website hold ssl port as 443.so when i create new website and assign the ssl port 443 it shows error...so i used 8443 as ssl port .. and while browsing the website in the IIS it shows this error..how to rectify?
can u help me on this........
Object not found!
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.If you think this is a server error, please contact the webmaster.
Error 404
localhost6/7/2011 3:51:39 PM
Apache/2.2.12 (Win32) DAV/2 mod_ssl/2.2.12 OpenSSL/0.9.8k mod_autoindex_color PHP/5.3.0 mod_perl/2.0.4 Perl/v5.10.0
Abhimanyu K VatsaRank #14 · 51.7K reputationPosted Jun 7, 2011, 3:51 AM EDT
http://www.c-sharpcorner.com/UploadFile/abhikumarvatsa/7460/?ArticleID=0e543b18-f6cb-4ec0-a8e8-6ab0aff937fc
Abhimanyu K VatsaRank #14 · 51.7K reputationPosted Jun 7, 2011, 6:04 AM EDT
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/56bdf977-14f8-4867-9c51-34c346d48b04.mspx?mfr=true
http://support.microsoft.com/kb/299875
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/596b9108-b1a7-494d-885d-f8941b07554c.mspx?mfr=true