473,394 Members | 1,766 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,394 software developers and data experts.

C# - APP: is HttpWebRequest / HttpWebResponce always possible?

Well I have just been having a really hard time lately and am hoping for a new thought on some trouble that I am having programmatically accessing my companies website to download my paycheck.

The problem lies in the levels or security that they use. On the surface there is (as expected) a user name and password, then you are in. Simple enough huh :) But on the other side there is a certificate which I think I am adding correctly and multiple cookies (but what is really throwing me, and as far as I understand is there is no way to deal with this) is the JavaScript level of determining where to send you.

I have been able to only get the front page and no further using HttpWebRequest/Response. I am adding my local certificate file, my credentials, adding a cookie container, etc..... I'm just lost at this point. Even if I try to directly access the final URL of the page that I want I just get bumped back to the front page. I have examined the headers as I log in and let me tell you that once you hit 'log in' you are redirected multiple times and the final capture is quite long. I'm quite sure that they are actively trying to prevent scraping. The company is quite paranoid about security.

I am able to access the site via a webBrowser control and even set up an automated way to get me where I want to go but it's slower that I would like. Is there a way to convert (cast) a webBrowser connection into a HttpWebRequest/Response so I can programmatically navigate once I'm through the front door?

I can offer some of my code if you feel that it is necessary but I'm pretty sure it's just impossible to do this without the webBrowser control.

So the base question is simply; Is there always a way to access a site programmatically or are there some sites that this is just not possible?
Sep 30 '08 #1
1 1579
Plater
7,872 Expert 4TB
Well if you really wanted to get dirty about it, you can have your code examine the javascript they use and redirect yourself to the correct places maybe based on the javascript?
Oct 1 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Tammy | last post by:
Hi, I have an aspx app which needs to post data to a form and read the response. I am confused on whether I should be using the get_url using "POST" method or the post_url using "GET" method. ...
6
by: Rachet? | last post by:
I am getting a "The remote server returned an error: (400) Bad Request." error while trying to send data to an asp page. The puzzle is, if I paste the string I want to send on a browser address...
4
by: Christina N | last post by:
What is the easiest way to make an ASP.Net application send data to another web-app? For instance I would like APP3 to log user stats from APP1 and APP2. The applications are located on different...
2
by: Maris Janis Vasilevskis | last post by:
Hi, Is it possible to force HttpWebRequest to do exactly (not approximately) the same as MSXML2.ServerXMLHTTP does? More details. I port JScript to JScript.NET I have a server (ASP invoking...
6
by: Darren | last post by:
I created a class to submit an xml document to a webpage. When I use my class in a console application, everything submits correctly. However, when I attempt to use my class from an asp.net...
0
by: boxboy | last post by:
Hi, I'm writing a console application and am having a problem with HttpWebRequest when posting data to a webserver. A "System.Net.WebException: The server committed a protocol violation" is always...
8
by: ThunderMusic | last post by:
Hi, What I want to do is send Http requests for a stress test application. The url I query will send me a 404, 400, maybe others or redirect me to a different url. I need to do that...
4
by: Morgan Cheng | last post by:
Days ago, I post a question on how to make SoapHttpClientProtocol instance make new TCP connection for each web service request. Now, I found how. SoapHttpClientProtocol has a protected method...
1
by: ALA | last post by:
Hi, does anybody know if it is possible to pass the SessionID with a web request by using a cookie so that the invoked page in the same domain can access the session objects of the current user?...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.