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

Posted on 2009-12-17
Last Modified: 2013-12-17
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!
Question by:keyuk
    LVL 11

    Assisted Solution

    can u try adding the WCF service reference using the visual studio add reference method as it will add all the endponts configurations in the config files.

      right click on the project and select the options of add service reference

     manually using the svcutility is bit difficult.

    Accepted Solution

    I have found the solution.

    I didn't have the endpoint and bindings defined properly in the web.config so the serverice wasn't advertising it's meta information properly.

    I have changed the way I'm accessing the service and am now using a service reference for the project and this is automatically setting up the required binding info in the client project.

    This area is very new to me but the learning curve has been massive! I'm going to use this technology in ebery new project as it's so powerful. Good luck to everyone who embraces this!!

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
    For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK ( for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now