Current time: 11-23-2019, 11:08 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Basic authentication
09-28-2016, 05:13 PM
Post: #1
Basic authentication
Hi guys,
I've a problem when I try to login in sites that use basic authentication. What script should I use? I program in C# and now i try this method to generate url:

string urlString = _phpUrl + "runtest.php?url=" + url + "&location=" + agentName + ".custom&aftec=25&fvonly=0&plr=0&latency=28&bwUp=1000&bwDown=" + bwDown + "&video=on&runs=1&f=xml";
string encoded = System.Convert.ToBase64String(Encoding.GetEncoding("ISO-8859-1").GetBytes(username + ":" + password));
string toEncode = string.Empty;
toEncode += string.Format("setHeader\tAuthorization\tBasic\t" + encoded);
urlString += HttpUtility.UrlEncode(toEncode)


Thanks in advance,
Jak
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)