Arghhh! I'm getting so frustrated trying to get my head around this WCF service.
So I created a WCF service. It works fine in my laptop where I launch it from Visual Studio 2010. Now I have to deploy it on a Windows Server 2003 machine. So I created a virtual directory on that server's IIS. Next I copied the WCF Service DLL file in the virtual directory. I also created an SVC file which had the following entry:
<%@ ServiceHost Language="C#" Service="AMWCF.Service1" %>
Ok first of all, I'm so confused here. Where does this line tell the Server where the DLL file is? It just says "AMWCF.Service"! not file location!
So when I try to launch my webpage, it gives an error "THE PAGE CANNOT BE DISPLAYED". I've tried everything which I can find on the net including:
- Reinstalling the ServiceModelReg
- Restrarting IIS
- Allowing ASP.NET in IIS
Sorry for showing my frustration here. I really really reallllly appreciate any help. Thanks guys. You guys are the best
Page cannot be displayed error is coming from IIS.
If you have a class library with your WCF service inside, you need to copy the service DLL into the
.\bin
folder one level down from your virtual directory. That's where the WCF runtime looks for its service classes.Also see these resources:
The WCF Developer Center on MSDN has a "Beginnger's Guide" (available right from the landing page) which has tons of those excellent 5-10 minute screencasts explaining all things WCF to you - highly recommended!
If this stuff is new to you, you should use the visual studio deployment features, try right click your web project and click deploy, I think it'll solve your issues, you can even deploy using ftp through this wizard.