WCF client proxy class

Topics: General Discussion Forum, July and December Releases Forum
Aug 5, 2007 at 12:47 AM
Hello again! here I am with a new anoying problem asking for anyone to help me out here!

Has anybody host a WCF web service in IIS6 and create a proxy class with svcutil succesfully???

I have created a wcf web service using the software factory and test it with out any problems on the Test Host and Client projects. But now I wanna host my service in IIS6, so I just copy all the dll files from the ServiceContracts, BusinessLogic and ServiceImplementation projects in bin directory under a Virtual Folder in IIS. Also copy the .svc files and web.config file from the Tests/Host Project in the same Virtual Folder. When put the address to access the svc file service in a web browser it seems to be working but when I try to use svcutil to generate the proxy file and the configuration file, I shows an Error and doesn't generate any code.

I just write => svcutil http://localhost/**virtualdirectory**/**servicename**.svc
I also tried => svcutil http://localhost/**virtualdirectory**/**servicename**.svc?wsdl and I just get a diferent error message.

Does anyone had a similar problem or know how to fix it??? thanks in advance!

PS. I want the proxy class so I can consume the web service from a ASP.NET web site because I don't have the "Add Service Reference" option like when I use a Winform project. Am I trying to consume the service in the right way?
Aug 7, 2007 at 3:24 PM
There's a little util buried inside I think the 'Visual Studio Extensions for WCF & WPF CTP Nov 2006.msi' which will put the context menu into your ASP.NET solution.

This is MUCH easier.
Aug 7, 2007 at 3:55 PM

chan wrote:
Has anybody host a WCF web service in IIS6 and create a proxy class with svcutil succesfully???

Have a look here - http://chakkaradeep.wordpress.com/2007/07/30/adding-a-wcf-service-to-your-application on how to add WCF Service to your client. I have used IIS 7 but once you host it in IIS 6, the steps to add are same.
Aug 8, 2007 at 12:57 PM
thank you all for taking time to answer!

chakkaradeep: I did see this "Add Service Reference" option in other projects but I need to add a wcf web service to an ASP.NET web project and it only has "Add Web Reference" option.

Carphill: I will start looking for that little util and see if I can add this option to my web project.

So far, copying the proxy class and the configuration file auto-generated by the recipe on the Client project to my own asp web site, worked fine with some modifications in the web.config file.

But doesn't seem like the right way to do it. I believe that there should be more integration in an asp website and a WCF web service created with WSSF.