Digital Colony is the ad-free technical web site for Michael Allen Smith of Seattle, WA.
Amazon Link ASP.NET Report DeepFitness API Geocoding GridView Highlighter Mask Email SmugMug
Microsoft Silverlight 4 Business Application Development: Beginners Guide by Cameron Albert
Request.IsSecureConnection
if (Request.IsSecureConnection) { Response.Write("HTTPS"); } else { Response.Write("HTTP"); }
if (!Request.IsSecureConnection) { // send user to SSL string serverName =HttpUtility.UrlEncode(Request.ServerVariables["SERVER_NAME"]); string filePath = Request.FilePath; Response.Redirect("https://" + serverName + filePath); }
Labels: ASP.NET
posted by MAS on Jan 8,2007
Legacy Comments
If you found this site helpful, consider buying me a cup of coffee.
Digital Colony Copyright © 1999-2010 XHTML 508 Try...Catch Disclaimer: For brevity many examples do not include error handling. That is your responsibility.