c# - Automating Authentication Programmatically -
first of all, screen below popup window when requested asp web page. when authenticated, responses xml data.
1.what type of authentication method. how managed? 2.how can bypass programmatically(using c sharp) login screen supplying necessary credentials.
thanks, helped much. solved it. code below 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();
Comments
Post a Comment