GetRequestStream hangs - a .NET 3.0 problem?

Topics: Developer Forum
Mar 11, 2008 at 1:54 AM
Edited Mar 11, 2008 at 2:01 AM
I've got two applications. The first doesn't authenticate and just allows one to get info on public photos, given a filter string. It's built w/ Visual Studio V8, and runs great on my machine as well as my co-worker's. The second application does go through the steps of authentication, and allows one to get info on their photos/albums. It's built with the same compiler. It runs gets on my machine, but not on my buddy's. His hangs in the call to GetRequestStream. So, we looked at what the difference is between my machine and his. I've got .Net 2.0 installed, and he's got .Net 3.0. As far as internet proxies go, we're the same. This app does NOT set flicker's Proxy property. We tried a slight change on his machine such that it set the Proxy to the one returned from GetDefaultProxy, but that didn't fix it. Have you had any issues running w/ .Net 3.0 installed?

The application only does "get" type of operations, so maybe I should do what worked for http://www.codeplex.com/FlickrNet/Thread/View.aspx?ThreadId=22500....which is to comment out the line that set req.Method to POST???

Thanks.
Coordinator
Mar 11, 2008 at 9:54 AM
The only problem is that .Net 3.0 is actually .Net 2.0 just with some extra libraries available (the WPF, WCF and WF stuff basically).

You can try making the change, but it does appear to be very strange. In my mind I'm convinced it has something to do with proxies, but I can't prove that or even suggest what the cause might be :(
Mar 11, 2008 at 4:00 PM
I did run the application that hangs on my buddy's machine w/ the line that sets req.Method to POST commented out. It still hung.

The difference between the first app and the second is that the first app (this is the one that never hangs) is only making flickr calls that do not require authentication nor requies signatures. The first app just new's up a Flickr object, sets the api key and then searches for public photos w/ the PhotosSearch method. However, the second (hanging) app does use methods that require a signature (AuthGetFrob is the first call it makes after the ctor and setting the api key and shared secret, which is where I see GetRequestStream hang). So, maybe the question is why would the addition of the signature to the created url make a difference? There doesn't appear to be any difference in the way the two machines are setup as far as internet proxies go (we're both w/in the firewall of a company and both are setup to have an automated script run). I'm not a web developer, so I'm clueless as far as figuring out what knobs to turn that might give me another clue as to why its hanging (any logging switch that can be flipped?).

Thanks