开发者

C# WCF service host question

I have a C# WCF service DLL that gets hosted by WcfSvcHost.exe when I debug. I would li开发者_如何学编程ke to deploy this onto a machine nearby. What do I use to host this dll on the machine that I want to deploy it to?

Could someone point me to the needed documentation?

I know you can build the service as a .exe and make it self hosting, but I'd rather not do that.

Is there some way to make a windows service based on this WCF dll? I also do not want to use IIS because the target machine might not have it.


Yes, you can create a Windows Service project and host your services there. Keep in mind you have to set the url, open the services and so on, stuff you don't need to do while hosting them on a IIS.


There's a few really good articles out there - basically, it's really simple: you need some config for your WCF service, and a ServiceHost instance which hosts your service class (that implements the service contract) - and that's about it!

Check out these resources:

  • Hosting WCF Services
  • WCF Essentials: Self-Hosting
  • Configurating Host base addresses in WCF

Should help a bit - otherwise come back and ask more specifically, if you have problems!

Marc


You can make an wpf application to host it: http://wcfguidanceforwpf.codeplex.com/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜