Weston Goodwin
Weston Goodwin

Reputation: 343

Silverlight WCF service

Initially created a WCF service with one method and everything works fine. I tried to add a new method to the service and for some reason when I try to update the service it does not find this new method. Any advice?

Upvotes: 0

Views: 94

Answers (2)

Weston Goodwin
Weston Goodwin

Reputation: 343

I had to add

[OperationContract]

Above each new function in the IService1.cs file. So now the IService1.cs file looks like this:

[ServiceContract] public interface IService1 { [OperationContract] List func1();

    [OperationContract]
    double func2();
}

Upvotes: 1

Joe Doyle
Joe Doyle

Reputation: 6383

Is the service in the same solution as the Silverlight app? That seems to help when updating the service. Also, are you sure your service is compiling and starting correctly? If there is a problem, VS can't read the WSDL and nothing gets updated.

Other than that, sometimes VS just doesn't refresh it right for me and it's faster just to re-create it.

Upvotes: 2

Related Questions