I am building a restul service using ServiceStack.NET. I am employing basic auth via a service base class. I would like to utilize SSL to secure all requests to my service.Unfortunately, I am not well versed in this area. Can anyone explain the basics to me and possibly provide examples of how to get this working? I realize I will need an SSL certificate on the hosting web server. What about the clients? My scenario involves a finite a set of known WPF clients that will consume the service(think specific workstations accross a geographic region).
So it would be unnecessary to do any sort of checking for certs/https in a request filter or the like?
In my case, I plan to host the service within an MVC app. The service would require all traffic through https, the mvc site would not.Is this possible?
this.RequestFilters.Add((req, res, dto) =>
{
if (!req.IsSecureConnection)
{
res.StatusCode = (int)HttpStatusCode.Forbidden;
res.Close();
}
}
Any chance you can provide an example of the request filter? Would I just throw a 403 if the request was HTTP?