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"]; } _membershipService = WcfClientFactory.Create <IWcfSecurityService>(_config["serviceUri"]); base.Initialize(name, config); //NOTE: RoleProvider empties this collection }
private void createService(string serviceUri) { _membershipService = WcfClientFactory.Create <IWcfSecurityService>(serviceUri); }
public WcfMembershipProvider(string url, string token) { url = ConfigManager.ResolveValueSetting(url); _membershipService = WcfClientFactory.Create <IWcfSecurityService>(url); }