Пример #1
0
    public APIServiceSoapClient CreateAPIProxy()
    {
        DocuSignSample.AccountCredentials creds = GetAPICredentials();
        APIServiceSoapClient apiClient          = new APIServiceSoapClient("APIServiceSoap", creds.ApiUrl);

        apiClient.ClientCredentials.UserName.UserName = creds.UserName;
        apiClient.ClientCredentials.UserName.Password = creds.Password;

        return(apiClient);
    }
Пример #2
0
 public DocuSignSample.AccountCredentials GetAPICredentials()
 {
     DocuSignSample.AccountCredentials credentials = new DocuSignSample.AccountCredentials();
     if (SettingIsSet("APIUrl") && Session["APIAccountID"] != null && Session["APIEmail"] != null && Session["APIPassword"] != null)
     {
         credentials.AccountId = (string)Session["APIAccountID"];
         credentials.UserName  = "******" + (string)Session["APIIKey"] + "]";
         credentials.UserName += (string)Session["APIUserID"];
         credentials.Password  = (string)Session["APIPassword"];
         credentials.ApiUrl    = ConfigurationManager.AppSettings["APIUrl"];
     }
     else
     {
         this.GoToErrorPage("Please make sure your credentials are entered in web.config");
     }
     return(credentials);
 }
Пример #3
0
    public DocuSignSample.AccountCredentials GetAPICredentials()
    {
        DocuSignSample.AccountCredentials credentials = new DocuSignSample.AccountCredentials();
        if (SettingIsSet("APIUrl") && Session["APIAccountID"] != null && Session["APIEmail"] != null && Session["APIPassword"] != null)
        {
            credentials.AccountId = (string)Session["APIAccountID"];
            credentials.UserName = "******" + (string)Session["APIIKey"] + "]";
            credentials.UserName += (string)Session["APIEmail"];
            credentials.Password = (string)Session["APIPassword"];
            credentials.ApiUrl = ConfigurationManager.AppSettings["APIUrl"];

        }
        else
        {
            this.GoToErrorPage("Please make sure your credentials are entered in web.config");
        }
        return credentials;
    }
 public AccountCredentials GetAPICredentials()
 {
     var credentials = new AccountCredentials();
     if (SettingIsSet(Keys.ApiUrl) && 
         null != Session[Keys.ApiAccountId] && 
         null != Session[Keys.ApiEmail] &&
         null != Session[Keys.ApiPassword])
     {
         credentials.AccountId = (string) Session[Keys.ApiAccountId];
         credentials.UserName = "******" + (string) Session[Keys.ApiIkey] + "]";
         credentials.UserName += (string) Session[Keys.ApiUserId];
         credentials.Password = (string) Session[Keys.ApiPassword];
         credentials.ApiUrl = ConfigurationManager.AppSettings[Keys.ApiUrl];
     }
     else
     {
         GoToErrorPage("Please make sure your credentials are entered in web.config");
     }
     return credentials;
 }
Пример #5
0
        public AccountCredentials GetAPICredentials()
        {
            var credentials = new AccountCredentials();

            if (SettingIsSet(Keys.ApiUrl) &&
                null != Session[Keys.ApiAccountId] &&
                null != Session[Keys.ApiEmail] &&
                null != Session[Keys.ApiPassword])
            {
                credentials.AccountId = (string)Session[Keys.ApiAccountId];
                credentials.UserName  = "******" + (string)Session[Keys.ApiIkey] + "]";
                credentials.UserName += (string)Session[Keys.ApiUserId];
                credentials.Password  = (string)Session[Keys.ApiPassword];
                credentials.ApiUrl    = ConfigurationManager.AppSettings[Keys.ApiUrl];
            }
            else
            {
                GoToErrorPage("Please make sure your credentials are entered in web.config");
            }
            return(credentials);
        }