简体   繁体   English

如何在 https (ssl) 通道上的服务堆栈上运行 RESTful Web 服务

[英]how to run a RESTful webservice over service stack on an https (ssl) channel

I looked at the documentation and examples in the service stack library and googled around but couldn't find a way to create an ssl (https) web service.我查看了服务堆栈库中的文档和示例,并四处搜索,但找不到创建 ssl (https) Web 服务的方法。 In particular in the example i run the console example (really cool) that extends the AppHostHttpListenerBase class.特别是在示例中,我运行了扩展 AppHostHttpListenerBase 类的控制台示例(非常酷)。 I would like to make it run with https.我想让它用 https 运行。

You must set up a Server Certificate for the Http Listener, here's a walk through example of how to do that:您必须为 Http 侦听器设置服务器证书,以下是如何执行此操作的示例:

https://docs.microsoft.com/en-us/archive/blogs/jpsanders/how-to-walkthrough-using-httplistener-or-http-server-unmanaged-code-c-as-an-ssl-simple-server https://docs.microsoft.com/en-us/archive/blogs/jpsanders/how-to-walkthrough-using-httplistener-or-http-server-unmanaged-code-c-as-an-ssl-simple-服务器

Whilst here is an article for setting up SSL with HttpListener on Mono: Does HttpListener work well on Mono?虽然这里有一篇关于在 Mono 上使用 HttpListener 设置 SSL 的文章: Does HttpListener 在 Mono 上运行良好?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 Service Fabric 中通过 HTTPS 调用 WCF:请求已中止:无法创建 SSL/TLS 安全通道 - Calling WCF over HTTPS in Service Fabric : The request was aborted: Could not create SSL/TLS secure channel 如何在WCF RESTful服务上启用HTTPS? - How to enable HTTPS on WCF RESTful Service? RESTful WebService CORS预检通道未成功 - RESTful WebService CORS Preflight Channel did not succeed 如何使用带有ssl的证书通过https://连接到webservice - How to use a certificate with ssl to connect to webservice via https:// 通过SSL的WCF服务无法使用授权'test-service.hostname.com'为SSL / TLS建立安全通道 - WCF Service over SSL Could not establish secure channel for SSL/TLS with authority 'test-service.hostname.com' 如何调用restful webservice - How to call restful webservice 无法通过SSL使用Web服务 - Cannot consume webservice over ssl 服务栈上的SSL - SSL on Service Stack WCF客户端绑定以访问https服务。 无法为具有权限的SSL / TLS建立安全通道 - WCF client binding to access https service. Could not establish secure channel for SSL/TLS with authority 尝试从Visual Studio添加Https服务时出现“无法创建SSL / TLS安全通道”错误 - “Could not create SSL/TLS secure channel” Error while trying to add Https Service from Visual Studio
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM