運行時上下文: 一個WCF服務使用WSDualHttpBinding在Mono Linux上運行。 我使用的app.config,創建一個端點用過WSDualHttpBinding異常通過單聲道運行wsDualhttpbinding
的app.config服務(局部的)
<endpoint address="http://192.168.0.101:8889"
binding="wsDualHttpBinding" bindingConfiguration="wsDualHttp_Binding"
contract="DynIPServiceContract.IDynIPService" />
服務代碼:
static void Main(string[] args)
{
try
{
ServiceHost sh = new ServiceHost(typeof(DynIPService.DynIPService));
sh.Open();
foreach (var ep in sh.Description.Endpoints)
{
Console.WriteLine("Address: {0}, ListenUri: {1}, ListenUriMode: {2} ", ep.Address, ep.ListenUri, ep.ListenUriMode);
}
Console.WriteLine("Service is running");
}
catch (Exception ex)
{
Console.WriteLine("Error:" + ex.Message);
throw;
}
finally
{
Console.ReadKey();
}
}
例外: 的默認值屬性'textEncoding'具有與屬性本身不同的類型:期望的System.Text.Encoding,但是是System.String (關於細節信息,請看一看異常的快照)
WSDualHttpBinding現在不實現true的事實。 – vinogradniy