GetAdminService

public IWFAdminService GetAdminService()
{
    string user = this.Context.User.Identity.Name;
             
    // Set Credentials – Windows Authentication
    System.Net.ICredentials credentials = 
        System.Net.CredentialCache.DefaultCredentials;
    // In case of form authentication
    //System.Net.NetworkCredential credentials = new 
        System.Net.NetworkCredential(userName, password, domain);
 
    string locale = "en-us";
       
    string adminBinding = 
        (String)ConfigurationSettings.AppSettings["AdminBindingUsed"];
    IWFAdminService m_adm = new WCFAdminProxy("MyApplicationName", 
        "", locale, user, credentials, adminBinding);

    Return m_adm;
}