没有ASP.NET/IIS的.NET Web服务? [英] .NET Web Services without ASP.NET/IIS?

查看:42
本文介绍了没有ASP.NET/IIS的.NET Web服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在实现一个服务器组件,该服务器组件需要公开Web服务接口,但是没有应用程序需要它与IIS上的ASP.NET一起运行.有没有在没有ASP.NET/IIS的情况下在.NET中实现Web服务的直接方法?(我使用的是.NET 3.5/C#3.0)

I'm implementing a server component that needs to expose a web-service interface, but there is no application need for it to run with ASP.NET on IIS. Is there a straightforward way to implement Web Services in .NET without ASP.NET/IIS? (I'm using .NET 3.5 / C# 3.0)

推荐答案

您可以使用 ServiceHost 类来托管服务. WCF教程包含示例代码.

You can use the ServiceHost class to host a service. The WCF tutorial contains sample code.

这篇关于没有ASP.NET/IIS的.NET Web服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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