Hi, I want codes source to enter my username and password in this code
I have tried with this code but did not work
UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP
Code
Gecko.GeckoPreferences.User["network.proxy.userName"] = "username";
Gecko.GeckoPreferences.User["network.proxy.password"] = "password";I have tried with this code but did not work
Code
public nsICancelable AsyncPromptAuth(nsIChannel aChannel, nsIAuthPromptCallback aCallback, nsISupports aContext, uint level, nsIAuthInformation authInfo)
{
string userName = nsString.Get(authInfo.GetUsernameAttribute);
string password = nsString.Get(authInfo.GetPasswordAttribute);
string realm = nsString.Get(authInfo.GetRealmAttribute);
if (PromptUsernameAndPassword(null, "Server Authentication", "The server '" + realm + "' requires a user name and password.", ref userName, ref password))
{
nsString.Set(authInfo.SetUsernameAttribute, userName);
nsString.Set(authInfo.SetPasswordAttribute, password);
aCallback.OnAuthAvailable(aContext, authInfo);
}
else
{
aCallback.OnAuthCancelled(aContext, true);
}
Cancelable cancel = new Cancelable();
return cancel;
}
public class Cancelable : nsICancelable
{
public int Reason { set; get; }
public void Cancel(int aReason)
{
Reason = aReason;
}
}UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP UP

