简体   繁体   中英

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.

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.
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM