Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / December 2005

Tip: Looking for answers? Try searching our database.

request.GetResponse()

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Josema - 14 Dec 2005 08:13 GMT
Hi to all,

I have a program that list broken links into a web site...

The program works in the majority of the times, but in some urls, i dont
know why, but the request.GetResponse (all the html of the page) that i get
using the program
is different than if i use the internet explorer...

Do you know a possible cause?

Signature

Thanks
Regards.
Josema

Vadym Stetsyak - 14 Dec 2005 10:13 GMT
On of the reasons may be that server detects ( with the help of headers )
who is requesting the page and renders html appropriately.
inernet explorer sets User-Agent header, that identifies browser type. You
can try to dupclicate headers that IE sets.

Use some sniffer application to detect what HTTP headers has IE request, and
then set the same headers in your application.

Signature

Vadym Stetsyak aka Vadmyst
http://vadmyst.blogspot.com

> Hi to all,
>
[quoted text clipped - 7 lines]
>
> Do you know a possible cause?
Josema - 14 Dec 2005 11:21 GMT
Hi Vadim, first of all thanks for your fast response...

I download a utility to know which headers are used by Internet explorer...
Then i modified my application, but without success... (like this:

request.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1;
Maxthon; .NET CLR 1.1.4322)";
request.ContentType = "text/html; charset=utf-8";
request.KeepAlive=true;

Do you know any link to a page with some piece of code about the headers of
the Internet Explorer....
Signature

Thanks
Regards.
Josema

> On of the reasons may be that server detects ( with the help of headers )
> who is requesting the page and renders html appropriately.
[quoted text clipped - 15 lines]
> >
> > Do you know a possible cause?
Vadym Stetsyak - 14 Dec 2005 14:51 GMT
Sniffer should tell you about the headers...

Also you can write your own asp.net application and test on it. From within
that application you can get headers of the request you send.

Signature

Vadym Stetsyak aka Vadmyst
http://vadmyst.blogspot.com

> Hi Vadim, first of all thanks for your fast response...
>
[quoted text clipped - 34 lines]
>> >
>> > Do you know a possible cause?
Joerg Jooss - 14 Dec 2005 20:49 GMT
> Sniffer should tell you about the headers...
>
> Also you can write your own asp.net application and test on it. From
> within that application you can get headers of the request you send.

Don't forget client-side scripting, which may also affect the resulting
page depending on whether the client actually executes scripts (like
IE) or not (like a pure HTTP client based on HttpWebRequest).

Cheers,
Signature

http://www.joergjooss.de
mailto:news-reply@joergjooss.de


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.