【发布时间】:2012-12-04 01:25:47
【问题描述】:
运行时上下文: 一个 WCF 服务使用了 Mono 在 Linux 上运行的 WSDualHttpBinding。 我使用 app.config ,创建一个使用 WSDualHttpBinding 的 EndPoint
服务的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 (有关详细信息,请查看异常快照)
【问题讨论】:
标签: wcf mono wsdualhttpbinding