Hello all,
This is in VS 2005. And IIS is 6.0. I am trying to use Self signed certificate for HTTPS. In the code i am redirecting from http to https for few pages. It is nt working fine. And in the IIS manager, for each page that i want HTTPs, i have changed its setting by checking "Require Secure Channel(SSL)" and "Require 128 bit encryption".
public void setSecureProtocol()
{
string redirectUrl = null;
bool bSecure = true;
bool SecureConnection = true;
if (bSecure && SecureConnection)
redirectUrl = Request.Url.ToString().Replace("http:", "https:");
else
if (!bSecure && SecureConnection)
redirectUrl = Request.Url.ToString().Replace("https:", "http:");
if (redirectUrl != null)
Response.Redirect(redirectUrl);
}
Pages throw me an error like this
The page must be viewed over a secure channel The page you are trying to access is secured with Secure Sockets Layer (SSL).
Please try the following:
* Type https:// at the beginning of the address you are attempting to reach and press ENTER.
HTTP Error 403.4 - Forbidden: SSL is required to view this resource. Internet Information Services (IIS)Internet Information Services (IIS)
When i try to put https in the start of the URl, it wont call. I have no idea whats wrong in here. Please help me out.
Here,
Its not redirecting from http to https.
For the pages that i am not redirecting in the code behind, and changing in the IIS, i can see the HTTPS when i check the two checkboxes.
Please someone help me!!!! Thanks a lot in advance!
Internet Information Services (IIS)