1
我可以成功使用WCF流式傳輸將xfer數據從服務器傳輸到同一臺計算機上的客戶端。但是,只要我將服務器部署到另一臺計算機上,就會發生性質錯誤「調用SSPI失敗:目標主體名稱不正確」。有沒有人遇到過這個。我試圖在兩側設置SecurotyMode.None,但那給了我一些其他超時錯誤!使用NetTcpBinding通過WCF流式傳輸
這裏是服務器綁定:
NetTcpBinding binding = new NetTcpBinding();
binding.TransferMode = TransferMode.Streamed;
binding.MaxReceivedMessageSize = int.MaxValue;
binding.CloseTimeout = TimeSpan.MaxValue;
binding.SendTimeout = TimeSpan.MaxValue;
var ep = serviceHost.AddServiceEndpoint(typeof(ISessionResultsServer), binding, string.Format("net.tcp://localhost:{0}/ResultService", port));
下面是客戶端綁定:
NetTcpBinding clientBinding = new NetTcpBinding();
clientBinding.TransferMode = TransferMode.Streamed;
clientBinding.SendTimeout = TimeSpan.MaxValue;
clientBinding.CloseTimeout = TimeSpan.MaxValue;
clientBinding.MaxReceivedMessageSize = long.MaxValue;
clientBinding.ReceiveTimeout = TimeSpan.MaxValue;
同意此無關與流。通過如上所述設置我的安全模式,並將SendTimeout從MaxValue更改爲20分鐘,呼叫就可以工作。 – 2010-09-20 07:35:09