Link to home
Start Free TrialLog in
Avatar of keyuk
keyukFlag for United Kingdom of Great Britain and Northern Ireland

asked on

WCF Service. svcutil.exe will not generat app.config file...

Hi Experts,

We have recently created a WCF service and have it hosted and running very happily.

I'm now writing a client website using an Asp.Net web project and have added the service as a reference. This has generated all the necessary bits I need to access the service and classes etc.

I've added using System.ServiceModel to the code behind and am trying to create a proxy client to use with the reference. The line myref.MyServiceClient proxy = new myref.MyServiceClient(); throws a "Could not find default endpoint element that references contract.... etc.

I did try creating the proxy client class by running svcUtil.exe and adding the generated files to my app, but the utility didn't create an app.config - which it's supposed to do - right?

I'm using VS2010 Beta 2 and .Net 4.0, so not sure if I'm running into bugs, or I'm just not setting things up correctly. I'm also not sure if I'm even using the technology properly as WCF is very new to me. Can anyone shed any light on how to create a client web app for using WCF services that should work.

Many thanks!
SOLUTION
Avatar of PlatoConsultant
PlatoConsultant
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial