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)
我正在实现一个服务器组件,它需要公开一个web服务接口,但是没有应用程序需要它来运行ASP。净在IIS。在。net中实现Web服务是否有一种简单的方法,而不需要ASP.NET/IIS?(我用的是。net 3.5 / c# 3.0)
5 个解决方案
#1
8
You can use the ServiceHost class to host a service. The WCF tutorial contains sample code.
您可以使用ServiceHost类来托管服务。WCF教程包含示例代码。
#2
5
Hosting and Consuming WCF Services
托管和使用WCF服务
This is an older article but still relevant.
这是一篇较老的文章,但仍然具有相关性。
#4
4
As long as you're using a verson of .Net that supports it, you should be looking at the Windows Communication Foundation (WCF). You'll need SOME process to host these services, so if you don't use IIS, you may end up writing your own EXE to host the service, but that's where you should start.
只要你使用的是支持它的。net的verson,你就应该看看Windows通信基础(WCF)。您将需要一些进程来托管这些服务,因此如果不使用IIS,您可能会编写自己的EXE来托管服务,但这正是您应该开始的地方。
http://msdn.microsoft.com/en-us/library/ms731082.aspx
http://msdn.microsoft.com/en-us/library/ms731082.aspx
http://msdn.microsoft.com/en-us/netframework/aa663309.aspx
http://msdn.microsoft.com/en-us/netframework/aa663309.aspx
#5
4
If you use WCF (Windows Communication Foundation), which has pretty much superceded Web Services, you can host in a Windows Service or in IIS.
如果您使用WCF (Windows Communication Foundation),它几乎已经取代了Web服务,那么您可以在Windows服务或IIS中托管。
#1
8
You can use the ServiceHost class to host a service. The WCF tutorial contains sample code.
您可以使用ServiceHost类来托管服务。WCF教程包含示例代码。
#2
5
Hosting and Consuming WCF Services
托管和使用WCF服务
This is an older article but still relevant.
这是一篇较老的文章,但仍然具有相关性。
#3
#4
4
As long as you're using a verson of .Net that supports it, you should be looking at the Windows Communication Foundation (WCF). You'll need SOME process to host these services, so if you don't use IIS, you may end up writing your own EXE to host the service, but that's where you should start.
只要你使用的是支持它的。net的verson,你就应该看看Windows通信基础(WCF)。您将需要一些进程来托管这些服务,因此如果不使用IIS,您可能会编写自己的EXE来托管服务,但这正是您应该开始的地方。
http://msdn.microsoft.com/en-us/library/ms731082.aspx
http://msdn.microsoft.com/en-us/library/ms731082.aspx
http://msdn.microsoft.com/en-us/netframework/aa663309.aspx
http://msdn.microsoft.com/en-us/netframework/aa663309.aspx
#5
4
If you use WCF (Windows Communication Foundation), which has pretty much superceded Web Services, you can host in a Windows Service or in IIS.
如果您使用WCF (Windows Communication Foundation),它几乎已经取代了Web服务,那么您可以在Windows服务或IIS中托管。