ServiceStack SelfHost SSL Support - ssl

i am trying to find a way to enable SSL on SelfHost ServiceStack,
as this requires administrative rights today for using "Net SH", as well as the fact this is "Not Clean" as i need to maintain the Port outside of my application configuration, manage removal if port Change, etc.
any help will be awesome.
thanks.

Configuring ServiceStack HttpListener with SSL is the same as configuring any HttpListener with SSL.
My previous answer contains more details on configuring ServiceStack HttpListener with SSL.

Related

Implementing SSL in ASP.NET core with Kestrel

I'm using the preview tooling for ASP.NET Core and VS 2015 that was released in Dec timeframe.
I've followed numerous online examples with how to enable SSL in Kestrel. None of them worked.
So I tried an option in project called "Enable SSL" and it seems to set a port for me, and works from local host, but doesn't seem to work from elsewhere.
I've also tried .UseKestrel() I have option.UseHttps("ssl.pfx", "password")
Below that I have UseUrls, but it doesn't seem to bind correctly to the ports because my SSL requests. When I try to issue SSL requests it times out. I used netstat and it seems like there is no port opened for my specified SSL port.
1) How do I use UseUrls? I need both localhost and remote machine access
2) How do I configure IIS express to allow the https calls?
If anyone has a good reliable way to set this up for VS 2015 in an ASP.NET Core project I would really appreciate it!
Thanks,
James
You're not saying what you have tried so far, so maybe you've tried that already, but you need to:
have a valid certificate that your server will be able to provide to the client
install the nuget package: Microsoft.AspNetCore.Server.Kestrel.Https
change your configure sequence so that it uses Kestrel Https
app.UseKestrelHttps(certificate);
change the url Kestrel is listening to one starting by https://
I used this article a few months back on VS2015: https://www.thesslstore.com/blog/implement-ssl-kestrel-asp-net-core/
I worked fine for me, but maybe there are a few things to adapt with the latest version.

Installing and using cutom certificate for Wcf service hosted in windows to enable SSL(HTTPS)

I have WCf service hosted in windows service.
I would want to know how would i make service accessible only through SSL and use certificate provided by certificate issuer(Godaddy,verisign etc).
If you created a WCF-Service you'll be forced to use an Windows IIS Server to host your application. When using an IIS, you can specify the Port and an SSL-Certificate.
To do this, just
add a new Website to your IIS. Make sure, you are using an application pool that supports .NET Framework 4.0.
copy your compiled WCF-Service and all references/files that your services needs to the associated IIS-Site-Folder
Configure the Bindings of this IIS Page. You need an imported SSL-Certificate at this point. If you already imported it, you can choose it from a ListBox within the Bindings-Dialog.
Within that dialog, you can specify the port
Make sure you've opened that port on your firewall
If you delete other bindings (meaning all HTTP Bindings), you can make sure that your service is only reachable through SSL and your specific port.
If you need cheap, good and multidomain/wildcard certificates, please check out StartSSL. In my opinion, they serve you the best.
You can find more information about IIS Configuration here.

IT-Hit WebDav Server and client certificate?

Does anyone know if it the IT-Hit WebDav Server (http://www.webdavsystem.com/server) can accept and check client certificates? Perhaps it is something that IIS does for the product when deployed in an IIS?
IT Hit WebDAV Server is based on IIS or HttpListener (two different implementations).
IIS supports client certificates, this means WebDAV Server based on IIS will work fine. All you need to do is setup your IIS.
As I see from this question HttpListener supports client certificates too. If you are missing something to make it work (can not reach some property for example), please contact me.

How to configure IIS/WCF to use wsat?

I would like do use Atomic Transactions between WCF and Weblogic, but I'm facing many problems to configure it.
I've already turned on the Wsat on Windows and associated it a valid certificate. I also enabled the SSL on IIS and configured the https port.
My main doubts are about the right WCF binding configurations and how and where I import the IIS certificate on Weblogic.
I imported my Wsat certificate in Demo.jks file (Weblogic keystore), but it did not work.
Best regards,
ps: Forgive my poor english :)

Configure a Port with an SSL Certificate w\o using Httpcfg

When one develops a self-hosted WCF http server,
one of the steps needed is to bind an SSL certificate to a port number:
httpcfg set ssl -i 0.0.0.0:8012 -h 0000000000003ed9cd0c315bbb6dc1c08da5e6
as stated in:
http://msdn.microsoft.com/en-us/library/ms733791.aspx
However,
It is hardly expected that in my deployment environment one would be able to do it.
(I don't even know if the httpcfg.exe is redistributable)
Moreover, if the user changed the port after he installed the product then he will need to run the command again....
how can this step be automated pro grammatically?
preferably in C# but if it can only be done in C++ (direct access to the Http Server API)
then I will manage :)
Have a look here: an open source C# UI for configuring HTTP.SYS that directly drives the API. This should get you an idea of the code necessary for configuring the certs.
For those tuning in a couple of years later:
This article from Mike Bouck's RAM has a clean C# wrapper for the http.sys api.
Таке а look on https://github.com/segor/SslCertBinding.Net
It also has nuget available
Install-Package SslCertBinding.Net
and does what you need perfectly. Thanks to the author.