예제 #1
0
        static MemexUpateHelper()
        {
            EndpointAddress  address = new EndpointAddress("http://localhost:60124/AutomaticUpdateImplement.svc/IAutomaticUpdateServer");
            BasicHttpBinding binding = new BasicHttpBinding();

            binding.MaxBufferPoolSize      = 2147483647;
            binding.MaxReceivedMessageSize = 2147483647;
            binding.MaxBufferSize          = 2147483647;
            binding.Name = "BasicHttpBinding_IAutomaticUpdateServer";
            ChannelFactory <IAutomaticUpdateServer> factory = new ChannelFactory <IAutomaticUpdateServer>(binding, address);

            channel = factory.CreateChannel();
        }
예제 #2
0
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="projectName"></param>
        public MemexCommonHelper(string projectName, string path)
        {
            _projectName = projectName;
            AppName      = projectName;
            AppPath      = path;
            EndpointAddress  address = new EndpointAddress("http://168.160.184.95:9113/AutomaticUpdateImplement.svc/IAutomaticUpdateServer");
            BasicHttpBinding binding = new BasicHttpBinding();

            binding.MaxBufferPoolSize      = 2147483647;
            binding.MaxReceivedMessageSize = 2147483647;
            binding.MaxBufferSize          = 2147483647;
            binding.Name = "BasicHttpBinding_IAutomaticUpdateServer";
            ChannelFactory <IAutomaticUpdateServer> factory = new ChannelFactory <IAutomaticUpdateServer>(binding, address);

            channel = factory.CreateChannel();
        }