Update Causes Duplicate Web.Config Entries RRS feed

  • Question

  • User-1078520054 posted

    I have a WCF web service, and an ASP.Net site that calls the service.

    When I make design changes to the service and compile it, I then go to the ASP.Net project in VS 2012, right-click on the Service reference node and select "Update Web/Service References".  It properly updates the references.  But it also puts duplicate entries in the ASP.Net web.config file.

    I get a duplicate wshttpbinding and duplicate endpoint section.  Then of course when I run the site and call the service I get an error because there are two entries in the web.config.

    I keep reading that this is a bug with VS 2008, VS 2010 and VS 2012 which keeps getting marked as closed

    But if it was a known issue and fixed, should I still be having this issue?  Or is there some update to VS 2012 Pro to fix this?  I am not interested in the workaround, where you create a .dll and reference that instead of the service directly. 

    Thursday, August 8, 2013 3:21 PM

All replies

  • User260886948 posted


    Yes, it has been fixed in vs2010.

    I use the visual studio 2012, but I do not meet the same question as you.

    Maybe you have to move the Service Reference to a separate library, and delete the (newly generated) app.config from the library project after executing Update Service Reference.

    Best Regards,
    Amy Peng 

    Friday, August 9, 2013 9:11 AM
  • User-1078520054 posted

    Thank you for the response, but we are not interested in moving the reference to a different library for various reasons. 

    Tuesday, August 13, 2013 6:51 AM