Okay boys'n'girls, and everyone else - listen up. I am going to cover some information here in this blog post that is nowhere else on the web. That is not surprising, consider that less than 2 people in the world are actually using WCF + .NET 3.5 + IIS 7.
Anyway, deploying a WCF service using .NET 3.5 framework to IIS 7 requires you to jump through a couple of hoops ..
Knock Knock
who'se there
Alex
Alex who?
Alex'plain why IIS 7 can be a real pain in the donkey.
Now, we already wrote up a WCF Service over here. Actually, what you wrote, was a WCF Service Library - the guts of the service itself are actually a DLL. And that is great, because now the host can be anything, independent of the service implementation itself. So the same service, can be hosted in IIS, WAS, or your custom host. NEAT.
Well, in this blogpost, I am going to cover hosting the service in IIS 7. I saw this MSDN article talking about hosting the WCF service in IIS. I thought that article was very sub-optimal. Here are my reasons:
a) It won't work for IIS 7 (Doh!). IMO it's quite bad that an MSDN article isn't upto the times - and they expect us devs to be up on all this cool new shiny stuff :-).
b) It talks of creating an App_Code directory, and throwing a .cs file in there - this is okay for your development environments, but not for production code deployment. Your deployment process must not require you to work in .cs.
c) That article literally talks about writing a new WCF service in IIS - Dangit!
I'm going to instead talk about - you've developed a service, now how the heck we deploy it. Well, here are the steps.
Build your Service Library in release mode.
Go to your Win2k8 server, and add the "Web Server" role - make sure ASP.NET is enabled.
Create a dir on your disk - I put mine in c:\code\HelloWorld