ofsarac


Hello.

I have a web service written in C#. When I debug it from Visual studio, it works well: calling a method gives reply. however, when I use it - call from localhost, it fails. when I use the method, it throws an exception.

"An attempt is made to create or change an object in a way which is incorrect with regard to namespaces". this is what I get as an exception message.

I do not know why this happens. It runs on Visual Studio fine, but not on IIS.

Is there anybody has an answer If so, I'd be very thankful.

by the way, I hope this is the right forum to post such question Smile.




Re: Calling a web service - namespace problem

John Saunders


Please supply more information. In particular, please supply the complete exception you receive, including the stack trace.






Re: Calling a web service - namespace problem

John Lambert - MSFT

Without seeing the detailed exception, my guess is that your application is running as you inside Visual Studio but as the ASP.NET user under IIS, and it's running into a permission / security issue. (Also, there might be something interesting in the server's event logs if that's the case.)