views:

38

answers:

2

Hi,

First of all, the screen below is the popup window when i requested an asp web page. When i am authenticated, it responses an xml data.

1.What is the type of this authentication method. How is it managed? 2.How can i bypass programmatically(using C sharp) this login screen by supplying necessary credentials.

login screen

A: 

Assuming that this is basic authentication, this link should guide you through it.

http://www.ie-soft.de/blog/PermaLink,guid,11609e8d-e0fc-41f4-83a2-6e8ea46339f6.aspx

spender
A: 

thanks, you helped very much. i solved it. just the code like below is enough.

    string url = "www.testweb.com";
    WebRequest myReq = WebRequest.Create(url);
    myReq.Timeout = 1000000000;
    string username = "Administrator";
    string password = "123456";
    myReq.Credentials = new NetworkCredential(username, password);
    WebResponse wr = myReq.GetResponse();
    Stream receiveStream = wr.GetResponseStream();
    StreamReader reader = new StreamReader(receiveStream, Encoding.UTF8);
    string content = reader.ReadToEnd();
Yusuf