Web serice works when I am debugging, but does not when I am not.

Web serice works when I am debugging, but does not when I am not.

Post by RXRoYW4gU3 » Thu, 27 Jul 2006 23:24:01


Hi,
I have a C#.net Web application which calls a web service
( http://www.yqcomputer.com/ ). It has run
just fine for months. Recently I started getting "System.Net.WebException:
The underlying connection was closed" errors. I started the application up in
debugging mode and it ran fine. After fiddling with things for awhile I now
find that it works while I am running in debug mode, but does not when I am
not in debug mode. I don't know if it matters, but I am not calling the web
service asynchronously.

Any idea what is going on? I am going to try it asynchronously and see if
that works, but this seems really weird to me either way!
Thanks,
Ethan
 
 
 

Web serice works when I am debugging, but does not when I am not.

Post by RXRoYW4gU3 » Fri, 28 Jul 2006 05:29:02

Hi again,
I have some more information about this, but I still don't have a
solution. Please take a look and see if it triggers any thoughts....

The the project in which I have this web service is a direct descendant of
another project. I made a copy of the project and then went in and manually
changed the Namespace designation in each file.

I looked at the web service in the object browser and it is still listed as
being under the OLD namespace! I tried dropping the web service and then
readding it. No help. I tried dropping it and then readding it under a new
name. No help. I looked at the "reference.cs" file under the web service and
it lists the old namespace. I manually changed the namespace in the
reference.cs file and the web service shows up under the correct namespace in
the object browser, but still only works when I am running in debug mode.

I think that debug mode either has appropriate permissions to use the web
service under that namespace somehow or it resolves the namespaces in a way
that works. I don't know which. While I could get away with deleting the old
namespace I don't want to and I have other projects, which I can't remove,
which use the same service and are having similar issues.

I am running .Net 1.1.

Thanks for any thoughts!
Ethan