Join the DZone community and get the full member experience.Join For Free
In ASP.NET There are two way of doing it. Either we can use current request to check whether it is secured or not or we can use server variables to check whether it it secure or not just like following.
Here in above code If this returns true then Page is secured otherwise it is not Or you can use following server variable to check the protocol.
So you can see its very easy to check whether page is secure or not. Hope you liked it… Stay tuned for more..
Published at DZone with permission of Jalpesh Vadgama, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.