Freigeben über


Odd error in consuming Web Service

Ok, this is really wierd. In my Photo Album Admin application I call the Photo Album WS. For one of the many web-methods in the WS, I get the following error:

An unhandled exception of type 'System.Web.Services.Protocols.SoapException' occurred in system.web.services.dll

Additional information: Server was unable to process request. --> Source and destination path must be different.

All the other web-methods work expect for one. I'm using the Microsoft WSE 1.0 SDK, but this web-method isn't doing anything WSE sepecific.

Has anyone come across this problem before? How do I go about fixing this?

UPDATE: After a little bit of debugging (NOT all this time
since my initial post!), I figured out that the problem wasn't what the
Exception above said it was. I ended up enabling the "Break into code everything
an Exception hits" in VS.net and ended up getting another error:

A first chance exception of type
'System.Net.WebException' occurred in system.dll

Additional information: The remote server returned
an error: (500) Internal Server Error.

So, I took a look at the Web Service, and indeed, there was a really odd
thing that I was doing in the code for this web-method which was throwing an odd
error. Granted, my error in the web-method is not excusable, however, VS.net
should be giving me a correct Exception that's being thrown. Most of the time
spent debugging this ended up not being finding the actual problem but trying to
debug a non-problem which the first Exception was pointing to. Anyway, this is
now in the process of being fixed.

Comments

  • Anonymous
    May 18, 2003
    I have encountered the same exact error, what is the fix?
  • Anonymous
    May 18, 2003
    You can try one of two things:
    1) If you are able to step through the code for the WebMethod in question, then do so. The error is somewhere in that WebMethod.
    2) Try wrapping all the code inside this WebMethod that's throwing the exception in a try...catch statement. On the catch, catch Exception ee, and then try emailing yourself the exception text. So, the code in the catch should look like:
    System.Web.Mail.SmtpMail.SmtpServer = "your.smtp.server";
    System.Web.Mail.SmtpMail.Send("your@email", "your@email", "error", ee.Message);

    This will tell you where the error is :)