vijayUV
vijayUV

Reputation: 13

no overload for the method xyz() with out parameters take 4 arguments

I have a web service like

 public void AbcXyz(string unm, string pass, out string status, out string Utype)
 {

 }

and i have added the reference of this web service to my solution, created a object to this webservice and called the web method like this

 srv.AbcXyz(Uname, encryptPswd,out result, out Utype);

Here i am getting an error

"No Overload for method 'AbcXyz' takes '4' arguments"

I really dnt understand why i am getting this error. can someone please help me in this issue..

Regards, vijayUV

Upvotes: 1

Views: 1080

Answers (2)

Luis Filipe
Luis Filipe

Reputation: 8718

Have you updated your web references?

Are you sure you're using the most up-to-date version?

What does intellisense show when you start typing "srv.AbcXyz"?


EDIT:

There must be something you're not updating.

  1. Compile your WS project.

  2. In your WS test calling the culprit method

  3. In the consumer project update your WebReferences.

  4. In the references file browse for the method. Check whether it has the signature you expect.

This ought to work! I'll wait for your feedback

Upvotes: 1

Joe Blow
Joe Blow

Reputation: 34

Did you recently change this method? I'm going a little out of my area of expertise here, but I know that with WCF you have to run something that generates a file that the consuming code uses to know what the service looks like. If creating a web services has a similar process, then maybe you need to go through that process again.

In other words, maybe the code calling the service is looking to an old file that's not telling it there's a method with 4 parameters yet.

Upvotes: 0

Related Questions