private void SetAddressBinding(string replyAddress, NodeType peerNodeType) { _peerNodeType = peerNodeType; _peerAddressBinding = WcfHelper.CreateAddressBinding( replyAddress, WcfConst.LimitMultiplier, WcfConst.ExpressMsgLifetime); // dispose any existing client base DisposeHelper.SafeDispose(ref _clientBase); }
public AddressBinding GetOrganizationBinding() { string url = Request.Host.Host; int port = Convert.ToInt32(Request.Host.Port); string cacheKey = url + ":" + port; AddressBinding bind = _cache.Get <AddressBinding>(cacheKey); if (bind == null) { AddressBinding binding = operations.Organization.GetAddress(url, port); _cache.Set <AddressBinding>(cacheKey, binding); return(binding); } else { return(bind); } }
public IActionResult Index() { AddressBinding binding = GetOrganizationBinding(); string url = Request.Host.Host; int port = Convert.ToInt32(Request.Host.Port); string cacheKey = url + ":" + port; //throw new Exception(cacheKey); if (binding == null) { return(Redirect("http://google.com")); } if (User.Identity.IsAuthenticated) { return(Redirect("/Home/Dashboard")); } return(View()); }
public MrktDataSenderV221(AddressBinding addressBinding) : base(addressBinding) { }