Is there a way to ensure that an ASP.NET application (only) runs on HTTPS?

I am wondering if there is a way to make sure that ASP.NET application can only be started using the HTTPS protocol

I am fine with any code (perhaps defensive programming?) That can do the trick or maybe some IIS / web server settings that can do the job.

+5
source share
3 answers

IIS will definitely allow you to require HTTPS. See below for instructions .

Edit: I had to dig around , but there is also Request.IsSecureConnection for defensive programming.

+5

SSL IIS , 403.4

" "

, Request.IsSecureConnection, SSL.

+2

All Articles