Esempio n. 1
0
 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);
 }
Esempio n. 2
0
        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);
            }
        }
Esempio n. 3
0
        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());
        }
Esempio n. 4
0
 public MrktDataSenderV221(AddressBinding addressBinding)
     : base(addressBinding)
 {
 }