Luke101
Luke101

Reputation: 65238

How to verify asp.net mvc web API is utilizing SSL

I have created a asp.net mvc web api project. I am passing sensitive data to a web api application. The web api application I created requires ssl. When I call the web api using https I would like to verify that the information is encrypted from end to end. Is there a way to do this or am I just being paranoid.

Upvotes: 1

Views: 262

Answers (1)

Dai
Dai

Reputation: 155035

You can configure IIS to require SSL (and IIS will perform redirections on your behalf) but the main way is by doing this:

if( Request.IsSecureConnection ) {
    // Using SSL or TLS.
}

Upvotes: 1

Related Questions