1

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.

1
  • 1
    You want to verify if incoming request is over HTTPS ( HttpRequset.IsSecureConnection ) or you want to understand what HTTPS/SSL means? Commented Dec 20, 2013 at 22:46

1 Answer 1

1

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.
}
Sign up to request clarification or add additional context in comments.

1 Comment

You can also decorate controllers and/or actions with [RequireHttps] and http requests will automatically be redirected to https before being allowed to execute the controller/action.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.