MajorTom
Fri Jun 17 23:31:45 CDT 2005
Thanks for your help
I tried with Webrequest
NetworkCredential networkCredential = new
NetworkCredential("UserName","Password");
networkCredential.Domain = "extranet";
WebRequest myRequest = WebRequest.Create(url);
myRequest.Timeout = 10000;
myRequest.Credentials = networkCredential;
WebResponse myHttpWebResponse = myRequest.GetResponse();
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]" <info@eggheadcafe.com> wrote in message
news:uDLCmT6cFHA.2124@TK2MSFTNGP14.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 programmatically
> 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.pulgarNO@NOverizon.net.do> wrote in message
> news:OtkxkA5cFHA.3144@TK2MSFTNGP10.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.
>>
>>
>>
>
>