Devam Ediyor

C# Website Login & webbrowser1 navigate problem // EASY

Hello,

I have an app which has 1 webbrowser, 1 richtextbox, 1 button.

I am using this code:

CookieCollection cookies = new CookieCollection();

HttpWebRequest request = (HttpWebRequest)[url removed, login to view]("[url removed, login to view]");

[url removed, login to view] = new CookieContainer();

[url removed, login to view](cookies);

//Get the response from the server and save the cookies from the first request..

HttpWebResponse response = (HttpWebResponse)[url removed, login to view]();

cookies = [url removed, login to view];

string getUrl = "[url removed, login to view]";

string postData = [url removed, login to view]("login={0}&password={1}&op=login", "XXXX", "XXXX");

HttpWebRequest getRequest = (HttpWebRequest)[url removed, login to view](getUrl);

[url removed, login to view] = new CookieContainer();

[url removed, login to view](cookies); //recover cookies First request

[url removed, login to view] = [url removed, login to view];

[url removed, login to view] = "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/[url removed, login to view] Safari/535.2";

[url removed, login to view] = true;

[url removed, login to view] = [url removed, login to view];

[url removed, login to view] = true;

[url removed, login to view] = "application/x-www-form-urlencoded";

byte[] byteArray = [url removed, login to view](postData);

[url removed, login to view] = [url removed, login to view];

Stream newStream = [url removed, login to view](); //open connection

[url removed, login to view](byteArray, 0, [url removed, login to view]); // Send the data.

[url removed, login to view]();

HttpWebResponse getResponse = (HttpWebResponse)[url removed, login to view]();

using (StreamReader sr = new StreamReader([url removed, login to view]()))

{

string sourceCode = [url removed, login to view]();

[url removed, login to view] = sourceCode;

}

[url removed, login to view]("[url removed, login to view]");

But the webbrowser1 doesn't navigate to [url removed, login to view] , because its asking the user / pass again, however in the richtextbox i can see that i am logged in..

maybe navigate must use a cookie as well?

thanks

Beceriler: C# Programlama

Daha fazlasını görün: webbrowser navigate, string problem, safari login problem, string programming, code programming website, get string, webbrowser, getresponse, create website login, navigate cookie, chrome cookie, cookies website, navigate, chrome method, chrome user data, safari open app, app chrome, webbrowser app windows, code login windows, post login, open app safari, app website login, webrequest login, cookie application, app open safari

İşveren Hakkında:
( 13 değerlendirme ) Budapest, Hungary

Proje NO: #4394574

Seçilen:

GisOnline

Ready to start!

0 gün içinde 30$ USD
(3 Değerlendirme)
2.8

4 freelancer bu iş için ortalamada 48$ teklif veriyor

EmbeddedCentrix

Experienced C# programmers ready to help you.

in 3 gün içinde30$ USD
(4 Değerlendirme)
3.2
binarygeotech

Ready to start now, Please contact me.

in 3 gün içinde100$ USD
(0 Değerlendirme)
0.0
bhaveshkhatarani

I am ready to work with.

in 0 gün içinde30$ USD
(0 Değerlendirme)
0.0