Hello group
I have a winforms client application. The customer now wants to have access
to information that is on a web page via https.
We have all the necessary account and password, but the problem is when we
need to confirm some data, the user have to leave his application go to the
web site enter the password and read the result and then confirm the
information.
What I want to do is all the manual steps of getting to the web site and get
the information at run time from the main application.
The main application is a c# winform, I have some classes to get the
response from a http but the page have a button and I don't know how to
analyze what is happening.
Is there a way to analyze what is doing when the user click the bottom from
the web page, and of couse the way to simulate that action from the main
application.
It's obvious that I don't have any experience with http protocol, and sorry
for my English to.
Thanks for your help
MajorTom
PD: I cross posting to 2 different group because I not sure where it's have
to go. 5 1326
In the long run, I think you'll have more consistant success
using the web browser control instead of making http
requests with the WebRequest class in your specific
situation.
Basically, the web browser control will let you
script logging into the web site just as a normal user
would and navigate around the site programmaticall y
at will.
I say this because a lot of sites with secured logins
will design things in their pages to try and block automated
functionality like you are trying to achieve. There is
nothing they can do that you can script against the
web browser control.
--
2004 and 2005 Microsoft MVP C#
Robbe Morris http://www.masterado.net
Earn $$$ money answering .NET Framework
messageboard posts at EggHeadCafe.com . http://www.eggheadcafe.com/forums/merit.asp
"MajorTom" <m.********@NOv erizon.net.do> wrote in message
news:Ot******** ******@TK2MSFTN GP10.phx.gbl... Hello group
I have a winforms client application. The customer now wants to have access to information that is on a web page via https.
We have all the necessary account and password, but the problem is when we need to confirm some data, the user have to leave his application go to the web site enter the password and read the result and then confirm the information.
What I want to do is all the manual steps of getting to the web site and get the information at run time from the main application.
The main application is a c# winform, I have some classes to get the response from a http but the page have a button and I don't know how to analyze what is happening.
Is there a way to analyze what is doing when the user click the bottom from the web page, and of couse the way to simulate that action from the main application.
It's obvious that I don't have any experience with http protocol, and sorry for my English to.
Thanks for your help
MajorTom
PD: I cross posting to 2 different group because I not sure where it's have to go.
Thanks for your help
I tried with Webrequest
NetworkCredenti al networkCredenti al = new
NetworkCredenti al("UserName"," Password");
networkCredenti al.Domain = "extranet";
WebRequest myRequest = WebRequest.Crea te(url);
myRequest.Timeo ut = 10000;
myRequest.Crede ntials = networkCredenti al;
WebResponse myHttpWebRespon se = myRequest.GetRe sponse();
But always get and error (401) unauthorized user.
OK, you tell me, that probably they will try to block automated
functionality
And now I get to the long run
Using the web browser, but I don't have any code or example about how to
scrip for the web browser from c#, can you give me some advice or links to
get started
Thanks again for your help
MajorTom
"Robbe Morris [C# MVP]" <in**@eggheadca fe.com> wrote in message
news:uD******** ******@TK2MSFTN GP14.phx.gbl... In the long run, I think you'll have more consistant success using the web browser control instead of making http requests with the WebRequest class in your specific situation.
Basically, the web browser control will let you script logging into the web site just as a normal user would and navigate around the site programmaticall y at will.
I say this because a lot of sites with secured logins will design things in their pages to try and block automated functionality like you are trying to achieve. There is nothing they can do that you can script against the web browser control.
-- 2004 and 2005 Microsoft MVP C# Robbe Morris http://www.masterado.net
Earn $$$ money answering .NET Framework messageboard posts at EggHeadCafe.com . http://www.eggheadcafe.com/forums/merit.asp "MajorTom" <m.********@NOv erizon.net.do> wrote in message news:Ot******** ******@TK2MSFTN GP10.phx.gbl... Hello group
I have a winforms client application. The customer now wants to have access to information that is on a web page via https.
We have all the necessary account and password, but the problem is when we need to confirm some data, the user have to leave his application go to the web site enter the password and read the result and then confirm the information.
What I want to do is all the manual steps of getting to the web site and get the information at run time from the main application.
The main application is a c# winform, I have some classes to get the response from a http but the page have a button and I don't know how to analyze what is happening.
Is there a way to analyze what is doing when the user click the bottom from the web page, and of couse the way to simulate that action from the main application.
It's obvious that I don't have any experience with http protocol, and sorry for my English to.
Thanks for your help
MajorTom
PD: I cross posting to 2 different group because I not sure where it's have to go.
MajorTom wrote: Thanks for your help
I tried with Webrequest
NetworkCredenti al networkCredenti al = new NetworkCredenti al("UserName"," Password"); networkCredenti al.Domain = "extranet";
WebRequest myRequest = WebRequest.Crea te(url);
myRequest.Timeo ut = 10000; myRequest.Crede ntials = networkCredenti al;
WebResponse myHttpWebRespon se = myRequest.GetRe sponse();
But always get and error (401) unauthorized user.
OK, you tell me, that probably they will try to block automated functionality
Are you sure the web site does not use Forms authentication?
Cheers,
-- http://www.joergjooss.de
mailto:ne****** **@joergjooss.d e
> Are you sure the web site does not use Forms authentication?
Is there a way for me to know?
when I get to the url I receive the normal dialog asking for user name and
password .
I' don't have any experience with webacces, any example any links?
Thanks again
MajorTom
"Joerg Jooss" <ne********@joe rgjooss.de> wrote in message
news:xn******** ********@msnews .microsoft.com. .. MajorTom wrote:
Thanks for your help
I tried with Webrequest
NetworkCredenti al networkCredenti al = new NetworkCredenti al("UserName"," Password"); networkCredenti al.Domain = "extranet";
WebRequest myRequest = WebRequest.Crea te(url);
myRequest.Timeo ut = 10000; myRequest.Crede ntials = networkCredenti al;
WebResponse myHttpWebRespon se = myRequest.GetRe sponse();
But always get and error (401) unauthorized user.
OK, you tell me, that probably they will try to block automated functionality
Are you sure the web site does not use Forms authentication?
Cheers, -- http://www.joergjooss.de mailto:ne****** **@joergjooss.d e
MajorTom wrote: Are you sure the web site does not use Forms authentication?
Is there a way for me to know?
Yes -- if it is Forms authentication, login is done using a normal web
form and the way credentials are exchanged is regular form data, not
authentication headers.
Can you ask the developers of that site what authentication scheme
they're using? Is it a public site or a private site?
when I get to the url I receive the normal dialog asking for user name and password .
If dialog means browser dialog (not web form) then it is HTTP
challenge/response authentication.
I' don't have any experience with webacces, any example any links?
Try to get hold of a good HTTP reference book, like "HTTP -- The
Definite Guide" from O'Reilly.
Cheers,
-- http://www.joergjooss.de
mailto:ne****** **@joergjooss.d e This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: NotGiven |
last post by:
I need to verify if the page that led the user to this page used http or
httpS.
for example, if the use cam to my page from:
httpS://www.dm.com/sample/foo.php
I want to know as opposed to coming from:
http://www.dm.com/sample/foo.php
I've tried looking at PORT but it doesn't seem to work properly.
|
by: Angie |
last post by:
Hello everybody,
I have an osCommerce shopping cart on my site, which is an open-source
product that uses php. I'm very new to php. I also have an online
scheduling application that I outsourced to a third party, which
resides on a different server. I asked my scheduling provider if there
was anyway I could use my osCommerce php...
|
by: kiran |
last post by:
Hi,
I hosted a PHP project on my web server(IIS) and I am accessing the
ip addres through my office public address like this:
(example)
https://61.95.204.43:8887/phptest/test.php
"https://61.95.204.43" is my company ip address and the port 8887 is
any requests that are comes through the port(8887) will be redirected
to my system, which...
|
by: Paul Sweeney |
last post by:
Does anyone know of a working (python) https proxy which allows viewing of
unencrypted data being sent from my browser to an https site?
I've worked my way through most on the list at
http://xhaus.com/alan/python/proxies.html, but while many claim to support
https, if you actually point your browser at the proxies, they work fine for
http,...
|
by: Bob Hansen |
last post by:
I am using the following code in my default.asp page to redirect the page
from HTTP to HTTPS
<%
if Request.ServerVariables("HTTPS") = "off" Then
Response.Redirect("https://" & Request.ServerVariables("HTTP_HOST") &
Request.ServerVariables("URL"))
| |
by: McKirahan |
last post by:
I have an ASP site, an SSL certificate, and an {Order page}.
I want to use "https" for the {Order page} and "http" for all others.
Each page "includes" a common ".asp" file which detects the
current protocol and page via the Request.ServerVariables():
"SERVER_PORT_SECURE" and "SCRIPT_NAME", respectively.
( If "SERVER_PORT_SECURE" = 1...
|
by: Mark Delon |
last post by:
Hi,
i want to log via python script to https page:
'https://brokerjet.ecetra.com/at/'
#
But it does not work.
I am using following code(see below)
|
by: SMike |
last post by:
I post this message again as I didn't get an answer back. I would appriciate
any ideas.
I am getting the following error when sending a https request after a long
period with no activity.
Cannot access a disposed object named "System.Net.TlsStream".
After that everything sems to be fine untill the next long idle period. The
code is...
|
by: Pooja Renukdas |
last post by:
Hello,
I have this web site where only two pages have to be secure pages and
I need to call them using https, but since I have my development
server and my production web server, I dont want to enter the absolute
url like
response.redirect("https://myProductionServer.com/SecurePage.aspx"),
because when Im working in the development server...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |