WCF Service won't update wsdl RRS feed

  • Question

  • I have a wcf service that just stopped updating the wsdl for local host on port 62442, now I can't debug anymore. It is set to use auto asigned port. it updates only a certain number of operation contracts then leaves out the rest.All are marked public either as "public" or as "Iservice1.SomeOpContract()" and Iservice1 is set up as [ServiceContract] public interface Iservice1. I have cleared the browser cache many times and cleaned and rebuilt the service many times with no result.

    Here is the kicker though, I have a web host project for that wcfService(added wcfService as a reference), and it uses  port 49231, if I use that port to build the service reference(UpdateService references) for my client apps all operation contracts get added to that wsdl. So I am able to build the dll and upload it to my remote machine and all contracts run fine. The dll in the wcfService debug folder is the same as gets added to the webHost project as well that has all the contracts, so why would the auto assigned port fail to add all contracts? What is my best solution(aside from starting over LOL)

    Thanks Jon

    There is a lot of code so I am not sure how much to post at this time.


    Thank You Jon Stroh
    Thursday, March 31, 2011 12:59 PM


All replies

  • not sure I understand - you change the service contract and the wsdl still shows the old one? if you close and start VS this still happens?
    WCF Security, Interoperability And Performance Blog
    • Proposed as answer by Sharon Talbot Friday, February 8, 2013 1:49 AM
    • Unproposed as answer by Sharon Talbot Friday, February 8, 2013 1:49 AM
    Thursday, March 31, 2011 1:36 PM
  • Oh yes I have been trouble shooting this for 2 weeks. I have cleaned rebuilt and closed and opened VS many many times. I would have had to scrap it and start over if not for using the webHost address to get the wsdl updated(so it would compile). Then I just copy the dll from the WcfService debug folder to the remote machine to run it.

    Yes after making many, probably 10 new operation contracts the port 62442 will not update the wsdl, however the web host on 49231 will update the wsdl, but I can't debug the local webHost because of binding mismatches.

    I know this is weird. Sorry


    Thank You Jon Stroh
    Friday, April 1, 2011 2:15 AM
  • start a new project and see if this happens there also, this is strange.
    WCF Security, Interoperability And Performance Blog
    • Marked as answer by JonStroh Friday, April 1, 2011 5:13 PM
    Friday, April 1, 2011 8:48 AM
  • Ok so I created a new empty WcfServiceLibrary, and Viola that fixed whatever problem there was in the project, all operation contracts build and show. Now to copy all the pages of code to the new project. :)

    I have one more question though, as I add operation contracts to the Iservice.cs file later, and then in the Service.svc file add them by right clickin the Iservice1 namespace at the top & select Impliment Interface it adds a new region each time I do that, how are you supposed to handle that? Do you copy the newly inserted code

    like below to the original region in the service.svc file or leave it in the newly created region

    public List<Client> FindClient(string uid)


    {throw new NotImplementedException();}

    Thanks Jon




    Thank You Jon Stroh
    Friday, April 1, 2011 5:12 PM