473,387 Members | 1,512 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to fake a aspx server to send data

Hi,
I had written a program long time ago that loaded a web site and
parsed the info on that web site and created a database about the
information.

Then the comapny that maintains the web site has moved to aspx web
forms, and my old program does not work, because the server recognizes
that there is no web browser at the other end and does not send the
appropriate page. I also used to parse the page to see if there is
more data and ask for the following pages. Now I can not do that
either, because it requires that I somehow need to send a submit
command with approriate aspx info.

Is there a way to write program that would fake the server to load the
page, and I will parse it again, ask for the next page, and so on?
Perhaps some examples?

Your help is appreciated.

Thanks.

May 12 '07 #1
3 1262
Well, the best way to "fake it" depends on exactly what their code is and
isn't detecting. I'd suggest you work out a deal with them so they'll
provide a web service you can call. This will be much more reliable. If
they are intentionally thwarting your efforts to screen scrape their site
then they will win eventually almost for sure.

That said, the WebRequest object is certainly the key to most of the
functionality you're talking about.
Here's more info:
http://msdn2.microsoft.com/en-us/lib...st(vs.71).aspx

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net
<ky*****@gmail.comwrote in message
news:11*********************@q75g2000hsh.googlegro ups.com...
Hi,
I had written a program long time ago that loaded a web site and
parsed the info on that web site and created a database about the
information.

Then the comapny that maintains the web site has moved to aspx web
forms, and my old program does not work, because the server recognizes
that there is no web browser at the other end and does not send the
appropriate page. I also used to parse the page to see if there is
more data and ask for the following pages. Now I can not do that
either, because it requires that I somehow need to send a submit
command with approriate aspx info.

Is there a way to write program that would fake the server to load the
page, and I will parse it again, ask for the next page, and so on?
Perhaps some examples?

Your help is appreciated.

Thanks.
May 12 '07 #2
Well, the best way to "fake it" depends on exactly what their code is and
isn't detecting. I'd suggest you work out a deal with them so they'll
provide a web service you can call. This will be much more reliable. If
they are intentionally thwarting your efforts to screen scrape their site
then they will win eventually almost for sure.

That said, the WebRequest object is certainly the key to most of the
functionality you're talking about.
Here's more info:
http://msdn2.microsoft.com/en-us/lib...st(vs.71).aspx

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net
<ky*****@gmail.comwrote in message
news:11*********************@q75g2000hsh.googlegro ups.com...
Hi,
I had written a program long time ago that loaded a web site and
parsed the info on that web site and created a database about the
information.

Then the comapny that maintains the web site has moved to aspx web
forms, and my old program does not work, because the server recognizes
that there is no web browser at the other end and does not send the
appropriate page. I also used to parse the page to see if there is
more data and ask for the following pages. Now I can not do that
either, because it requires that I somehow need to send a submit
command with approriate aspx info.

Is there a way to write program that would fake the server to load the
page, and I will parse it again, ask for the next page, and so on?
Perhaps some examples?

Your help is appreciated.

Thanks.
May 12 '07 #3
It could very easily be that your web parser is not reporting itself as a
web browser that their site understands.

For example... Use panels. These in most cases render as a div, but they
only do so if the .net environment understands the calling browser. If it
doesn't understand it, then .net goes downlevel and renders it as tables
instead. (This caused me a headache on a project I had last year, I had
written the .net page, a remote screen scraper was viewing it as tables, not
divs.)

To get around it from your direction, you need to report as a modern
browser.

If they are using link buttons to navigate their site, they are going to be
in for a lot of problems, for example, search engines (just like you) don't
click link buttons. They can't submit the form, which means many hidden
pages. (a trap that many in-experienced developers can easily fall into). It
could be worth mentioning that to them.

--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
<ky*****@gmail.comwrote in message
news:11*********************@q75g2000hsh.googlegro ups.com...
Hi,
I had written a program long time ago that loaded a web site and
parsed the info on that web site and created a database about the
information.

Then the comapny that maintains the web site has moved to aspx web
forms, and my old program does not work, because the server recognizes
that there is no web browser at the other end and does not send the
appropriate page. I also used to parse the page to see if there is
more data and ask for the following pages. Now I can not do that
either, because it requires that I somehow need to send a submit
command with approriate aspx info.

Is there a way to write program that would fake the server to load the
page, and I will parse it again, ask for the next page, and so on?
Perhaps some examples?

Your help is appreciated.

Thanks.

May 12 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Fakhar | last post by:
Hi All, How can I check fake requests on my webpage. I am asking for email address as input and I wounder if anyone write a program to send fake requests and my system will be busy to respond...
3
by: Simon | last post by:
Hi, I have webpage (sql.aspx) in asp.net with a big textbox. In this box, I generate SQL queries. Some of the queries can takes more than 2000 characters lenght. I want to send the content of the...
5
by: z. f. | last post by:
hi, i have a vb.net web application and i make a request using internet explorer to an aspx page. the aspx page size if over 170KB, and the page in internet explorer looks truncated and in the...
2
by: Mike D | last post by:
I have a windows control in an aspx page. It receives data from some serial hardware on the client. How do I get this data to an aspx page so that I can post it to the server? I will need to...
21
by: matvdl | last post by:
I have a system that was originally developed in asp - the pages are saved in SQL (there are over 10,000 pages) and saved to a temp directory in the server when requested by a client. I have...
2
by: Ravi | last post by:
Hi, I am trying to call an aspx page from an htm file. I have written something like this in my htm file <script src="Test.aspx"></script? The Test.aspx page should call a javascript function...
2
by: rn5a | last post by:
I have created the following WebService named NConnect.asmx using which I want an ASPX page to first authenticate a user & after successful user validation, the ASPX page should display a few...
13
by: Bob Jones | last post by:
Here is my situation: I have an aspx file stored in a resource file. All of the C# code is written inline via <script runat="server"tags. Let's call this page B. I also have page A that contains...
11
by: K Viltersten | last post by:
In the client.js file i declare the following variable. ... var str = "info"; ... In the corresponding ASP file called server.aspx.cs i declare two following methods.
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.