HTTPS (SSL)

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

I have an ASP.NET 1.1 Web application that I basically copy and tweak for
various clients. It has a login page that is accessible from a dynamically
constructed menu that exists in a user control. Until now, the login page
has not been using HTTPS (SSL). Now some of my customers need/want the login
page to use HTTPS and are willing to pay for a certificate.

My question: How can I keep my generic login page (common to all sites and
duplicated among sites) yet have it use HTTPS in some sites and HTTP in
others. I don't want to write separate versions of the page or Web app if
possible.

Thanks!
 
I'd store the protocol per-application in an appSettings section of the
web.config.

string strLoginPage;
string strProtocol;
strProtocol =(string) ConfigurationSettings.AppSettings["protocol"]; //
e.g., "https://"

strLoginPage = strProtocol + "mysite.com/login.aspx";

in web.config:
<appSettings>
<add key="protocol" value="https://" />
</appSettings>


-Peter
 
Back
Top