是的HttpListener类去precated? [英] Is HttpListener class deprecated?

查看:155
本文介绍了是的HttpListener类去precated?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用设置Web服务,而无需使用IIS。

I am trying with setting a web service without using IIS.

我知道我们可以使用的HttpListener之前创建简单的HTTP服务器。我想知道如果现在是pcated德$ P $因为WCF似乎提供了更先进的功能。

I knew we can use HttpListener to create simple http server before. I am wondering if it is deprecated now since WCF seems provide more advanced features.

推荐答案

微软建议不要使用它。我与WCF去,如果你需要知道这将是维护好几年。

Microsoft recommend against using it. I'd go with WCF if you need to know it'll be maintainable for some years.

另外,如果你很高兴暴露RESTful服务而不是SOAP或XML-RPC,有几个独立的.NET程序集,你可以用它来承载你的应用程序的HTTP服务器,而不在IIS或WCF任何依赖性 - 它们'LL单下运行,也没有问题:

Alternatively, if you're happy to expose RESTful services rather than SOAP or XML-RPC, there are a few standalone .NET assemblies you can use to host an HTTP server in your app without any dependency on IIS or WCF - they'll run under Mono, too, with no problems:

皮划艇 - https://github.com/kayak/kayak
萤火虫 - http://loudej.github.com/firefly/

Kayak - https://github.com/kayak/kayak
Firefly - http://loudej.github.com/firefly/

我们用它们来确保我们有完全控制服务器堆栈,并能的黑盒子是.NET的HTTP侦听器的参数之外调整的事情。

We use them to make sure we have complete control over the server stack, and can tweak things outside the parameters of the black-boxes that are .NET's HTTP listeners.

这篇关于是的HttpListener类去precated?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆