X
xeroxero
With this code, the built-in "Cassini" web server from Visual Studio
..NET 2005 (SP1) prepends "https", but on IIS 6, it prepends "http".
Why?
bool sslIsEnabled =
HttpContext.Current.Request.ServerVariables["HTTPS"] != "off";
appPath = ( sslIsEnabled ? "http://" : "https://" ) +
HttpContext.Current.Request.ServerVariables["SERVER_NAME"].ToString()
+ hostPort + appPath;
..NET 2005 (SP1) prepends "https", but on IIS 6, it prepends "http".
Why?
bool sslIsEnabled =
HttpContext.Current.Request.ServerVariables["HTTPS"] != "off";
appPath = ( sslIsEnabled ? "http://" : "https://" ) +
HttpContext.Current.Request.ServerVariables["SERVER_NAME"].ToString()
+ hostPort + appPath;