Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C# 

Proxy : UserName/Password in Gecko 29 [C#]

Hi, I want codes source to enter my username and password in this code

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
got the same problem, anybody can help?


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by iphone5sMar 26, 2017 03:26 AM 2 172 Mar 26, 2017 03:26 AM
Last Post: Cecilia
[.NET] by AnonCensoredJan 23, 2016 09:16 AM 0 104 Jan 23, 2016 09:16 AM
Last Post: AnonCensored
[.NET] by Jackie ChunNov 29, 2015 10:15 AM 0 120 Nov 29, 2015 10:15 AM
Last Post: Jackie Chun