> Hello folks,
>
> I made an application to request webpages from the internet and it works
> fine on the most of the uris but with that specific uri I need to query it
> does not work. That url would be:
http://v3.espacenet.com/family?sf=n&FIRST=1&F=8&CY=ep&LG=en&PN=us4000000&IDX=US4
000000&Submit=SEARCH&Action=FilterSearch&Filter=ep%2Fen%2Fespacefilt.hts&ResultT
emplate=ep%2Fen%2Fresults.hts&ResultErrorTemplate=ep%2Fen%2Fincerror.hts&ResultC
ount=10
> with this I only get back a cookie and I get back Headers in the response
> object but the stream is empty, not even an errormesage site from the
> server.
>
> What could be the cause? Any suggestions welcome
One possible cause is that the site may actually be sending you nothing.

Signature
John Saunders
John.Saunders at SurfControl.com
Anton Sommer - 01 Apr 2004 22:33 GMT
Hello John thank you for answering,
> One possible cause is that the site may actually be sending you nothing.
well it does definitely work in IE as you can test yourself by clicking on
the posted link, what possible causes are there? The site is definitely
returning a cookie and there is header information in the webresponse but
nothing in the stream. Could it possibly expect another clientside request
after returning the cookie? Who knows anything about it?
Thank you
Anton
John Saunders - 02 Apr 2004 00:36 GMT
> Hello John thank you for answering,
>
[quoted text clipped - 5 lines]
> nothing in the stream. Could it possibly expect another clientside request
> after returning the cookie? Who knows anything about it?
Anton,
If it works with IE but not with your HttpWebRequest, then I'd suggest using
a network monitor like ProxyTrace from http://pocketsoap.com. If I were you
I'd look at the interaction between IE and the remote site, then look at the
interaction between your program and the remote site.
Differences would be instructive...

Signature
John Saunders
John.Saunders at SurfControl.com
Anton Sommer - 02 Apr 2004 10:08 GMT
Thank you for answering John,
> I'd look at the interaction between IE and the remote site, then look at the
> interaction between your program and the remote site.
How could I do that?
Thank you
Anton
Jon Skeet [C# MVP] - 02 Apr 2004 10:13 GMT
> > I'd look at the interaction between IE and the remote site, then look at
> > the interaction between your program and the remote site.
>
> How could I do that?
Using the bit of his response which you snipped:
<quote>
I'd suggest using
a network monitor like ProxyTrace from http://pocketsoap.com.
</quote>

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
hi Anton,
this is not so complex..
just that you need to handle the cookies, and build a proper request
object and then get the response.
request = (HttpWebRequest)WebRequest.Create(UrlToSearch);
request.Method = "GET";
request.Accept = "*/*";
request.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT
5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)";
request.CookieContainer = cookies;
response = request.GetResponse();
stream = response.GetResponseStream();
HttpWebResponse webResponse =
(HttpWebResponse)request.GetResponse();
WebHeaderCollection headers = webResponse.Headers;
//check for cookies after this and add them to the cookies collection
//finsh handlig cookies
return stream;
NOTE: There is an article on the web on how to access hotmail from
c#.that should be a good reference.
hope this helps
regards,
Deepak