This project has moved and is read-only. For the latest updates, please go here.

operation timeout

Topics: Developer Forum, User Forum
Sep 2, 2007 at 9:53 PM

When using the function PhotosetsGetList(), which uses the function DoGetResponse() I get an operation timeout.
When I run my code in debug mode all works fine. However, when I build my project and run its executable these function almost always timeout.
Do you have any idea what causes this behavior and how can I fix it?

Thanks in advance.

Sep 3, 2007 at 1:55 PM
I can't think of a particular reason why this would be, there are a few places in the code that generate differently when debugging, but these are all just debug statements I believe, so nothing to do with connecting.

Are you using a config file perhaps?
Sep 3, 2007 at 6:09 PM
I don't have any config file which my application uses.
I noticed this bevavior both on Windows XP and Vista.

I'm talking about the statement req.GetResponse(); in the DoGetResponse(string url, string variables) method.

I also noticed you don't close req (HttpWebRequest) or res (HttpWebResponse) in this function. Is there any reason why?
Sep 4, 2007 at 5:13 PM

As far as I understand it the following are the case:

HttpWebRequest doesn't have a Close method.

HttpWebResponse.Close closes the response stream - this is also done by the using statement which calls the Dispose method on the StreamReader instance.

I'd be happy to have a look at your code if you wanted to send it to me (see project home page for my email address).