0

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

1 Answer 1

1

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();
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.