【问题标题】:how to run a RESTful webservice over service stack on an https (ssl) channel如何在 https (ssl) 通道上的服务堆栈上运行 RESTful Web 服务
【发布时间】:2012-01-06 20:22:26
【问题描述】:

我查看了 service stack 库中的文档和示例,并在 Google 上四处搜索,但找不到创建 ssl (https) Web 服务的方法。 特别是在示例中,我运行了扩展 AppHostHttpListenerBase 类的控制台示例(非常酷)。我想让它使用 https 运行。

【问题讨论】:

    标签: c# .net web-services rest servicestack


    【解决方案1】:

    您必须为 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

    这里有一篇关于在 Mono 上使用 HttpListener 设置 SSL 的文章: Does HttpListener work well on Mono?

    【讨论】:

    • 谢谢!这实际上是我的问题的解决方案。但是单声道呢?如何在运行单声道的 linux 服务器上做同样的事情?
    • @gigi 我已经更新了我的答案以显示 Mono 的 HttpListener 的链接,希望对您有所帮助。
    猜你喜欢
    • 1970-01-01
    • 2018-03-31
    • 1970-01-01
    • 2015-05-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-08-14
    相关资源
    最近更新 更多