views:

185

answers:

2

I am trying to teach myself WCF (using "Learning WCF" by Michele Leroux Bustamante), and so far the book is very instructive. The application that I eventually want to develop is a web service, hosted in IIS, and so "Hosting a Service in IIS", which is a section in Chapter 1, is exactly what I want.

BUT it seems that I need IIS installed on my development PC.

Why the question arises at all is that I thought I could use the same Visual Web Developer server as Visual Studio uses for ASP.NET development instead of (or until I as ready for) IIS. But I can't see (anywhere in the literature, I mean) how to get Visual Studio to use it for a WCF service.

I don't mind installing IIS, but would rather not if I don't have to.

In case you can't guess already, my experience with web development does not go further than a "Hello World" in ASP.NET.

A: 

This post shows how you can use Cassini (the built in web server) to host WCF

Stuart Dunkeld
Thanks, Stuart. That's quite ingenious, really. I wonder why the book doesn't suggest it?
Peter
+1  A: 

To develop WCF services: NO

However, if you want to later on host your WCF services in IIS, then yes - you need IIS, either on your development machine, or on a test server.

I would not recommend using hacks to use Cassini as your host server - it's just not 100% the same, and you might run into serious deployment problems in the end - just not worth it, really. If you want to deploy to IIS later, use IIS in your development and save yourself some grief!

On the other hand, you can of course always use self-hosting - host your WCF services yourself in a console app. Or use the built-in, Visual-Studio provided "WcfSvcHost.exe" for your test host. Works quite well. See the MSDN docs on WcfSvcHost for details on how to set that up (it's actually automatically configured that way, if you use the "WCF Service Library" project template in VS 2008).

Marc

marc_s
Thanks, Marc. I guess you're right - develop as close to real life as possible. I just didn't want to overkill it.
Peter