Saturday, October 4, 2008

simple way to check a site is secured or not

Recently when i was creating dynamic url's in my application, i wanted to know how to know is the site is using https or normal http, when i searched in google i got a simple solution which i want to share,

"Request.IsSecureConnection"
if(Request.IsSecureConnection)
{
Response.Write("secured");
}
else
{
Response.Write("not secured");
}

No comments: