Exemplo n.º 1
0
        protected override BorrowingProfileProviderClient GetServiceClient()
        {
            var binding = WcfClientFactory.Create <IBorrowingProfileProvider, BorrowingProfileProviderClient>(Settings.Settings.BorrowingProfileProviderUrl, ServiceTrustLevel.Default);

            ((WSHttpBinding)binding.Endpoint.Binding).MaxReceivedMessageSize = 2147483647;
            return(binding);
        }
Exemplo n.º 2
0
 public override void Initialize(string name, System.Collections.Specialized.NameValueCollection config)
 {
     foreach (var key in config.AllKeys) //Expand any embedded tokens in configuration string
     {
         config[key] = ConfigManager.ResolveValueSetting(config[key]);
     }
     _config = config;
     var serviceUri = _config["serviceUri"];
     if (config.AllKeys.Contains("serviceUri") == false || string.IsNullOrEmpty(config["serviceUri"]) == true)
     {
         ExceptionFactory.Throw<ConfigurationErrorsException>("Required attribute 'serviceUri' missing from provider configuration. Value may contain ScrimpNet configuration tokens: {app}, {env}, {user}, {machine}, {%app:<key>%}, and {%connection:<key>%}");
     }
     if (string.IsNullOrEmpty(_authenticationKey) == true && config.AllKeys.Contains("authenticationKey"))
     {
         _authenticationKey = config["authenticationKey"];
     }
     if (string.IsNullOrEmpty(_encryptionKey) == true && config.AllKeys.Contains("encryptionKey"))
     {
         _encryptionKey = config["encryptionKey"];
     }
     _appService = WcfClientFactory.Create<IWcfApplicationService>(_config["serviceUri"]);
     base.Initialize(name, config); //NOTE: RoleProvider empties this collection
 }
Exemplo n.º 3
0
 private void createService(string serviceUri)
 {
     _membershipService = WcfClientFactory.Create <IWcfSecurityService>(serviceUri);
 }
Exemplo n.º 4
0
 public WcfMembershipProvider(string url, string token)
 {
     url = ConfigManager.ResolveValueSetting(url);
     _membershipService = WcfClientFactory.Create <IWcfSecurityService>(url);
 }
Exemplo n.º 5
0
 /// <summary>
 /// Constructor used by the internal configuration manager
 /// </summary>
 /// <param name="baseconf">Native instance of configuration system</param>
 internal ConfigWcfConfigSystem(IInternalConfigSystem baseconf)
 {
     _nativeConfigSystem = baseconf;
     _svc = WcfClientFactory.Create <IWcfConfigurationService>(CoreConfig.Configuration.WcfUrl);
 }
Exemplo n.º 6
0
 /// <summary>
 /// Specialized constructor so this system can be used outside of ConfigurationManager
 /// </summary>
 /// <param name="wcfConfigurationServiceUrl">Fully qualified url including .svc file</param>
 /// <param name="endPointConfigurationName">Specific section within WCF configuration</param>
 public ConfigWcfConfigSystem(string wcfConfigurationServiceUrl, string endPointConfigurationName)
 {
     _svc = WcfClientFactory.Create <IWcfConfigurationService>(wcfConfigurationServiceUrl, endPointConfigurationName);
 }
Exemplo n.º 7
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="wcfConfigurationServiceUrl">Fully qualified url including .svc file</param>
 public ConfigWcfConfigSystem(string wcfConfigurationServiceUrl)
 {
     _svc = WcfClientFactory.Create <IWcfConfigurationService>(wcfConfigurationServiceUrl);
 }
Exemplo n.º 8
0
 /// <summary>
 /// Creates the WCF client.
 /// </summary>
 private void CreateWcfClient()
 {
     WcfClientFactory.Create <T, K>(ClientConfig, this, ConnectionCallback);
 }