开发者

How can I use net.tcp without IIS?

I have a web site and build a wcf service in it. I can run the code by calling it from a test page in the web site. The web site is ran by the vs2010 development server.

I do have IIS 7 but never use it.

Now I want to use the NetTcpBinding instead of BasicHttpBinding, everyone says it should be enabled in IIS, but how can this be done without using IIS and keeping everything in 1 project?

Thanks for any help

edit: A Windows service would be a solution, but that would mean adding a project to the solution, I really want to keep everything in 1 website, took me quite some time to get the service in the website in the first place.

This is about my own test version of the website, the production server is out of my reach. The service must be expanded by other developers later on it's bad if they have开发者_如何转开发 to run IIS just to test the service.


One way is to host the WCF service in a Windows Service - see How to: Host WCF in a Windows Service Using TCP for sample code.


Are you talking about how to develop without using IIS7 or how to put the service into a production environment without IIS7?

If it's the latter, then Stuart's answer is correct, but otherwise I would suggest that you start to develop using the web server that you will eventually be hosting the web site/service on.

Hosting in IIS7 has several advantages over hosting in a Windows Service such as fault tolerance and process isolation already built in.


Thanks for the replies guys, it looks like I have 3 options: 1. Host the service in a seperate project. 2. Host the website in IIS. 3. Use HTTPS, also secure.

PS: My development environment is very different from production :( In development I have unit testing and in production there are old ASP pages, that I can't even acces, but sometimes must refer to...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜