Example #1
0
        private void createService(string serviceUri, string clientEndPointName = "HashTagApplicationServiceEndpoint")
        {
            ChannelFactory <IWcfApplicationService> svc = new ChannelFactory <IWcfApplicationService>(clientEndPointName, new EndpointAddress(serviceUri));

            var client = svc.CreateChannel();

            _membershipService = client;
        }
Example #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
 }
Example #3
0
 public WcfMembershipProvider(IWcfApplicationService serviceProxy)
 {
     _membershipService = serviceProxy;
 }