【发布时间】:2016-12-20 19:29:47
【问题描述】:
我遇到了这个异常
未处理的类型异常 'System.ServiceModel.CommunicationObjectFaultedException' 发生在 System.ServiceModel.dll
当我尝试这段代码时
using (ServiceHost host = new ServiceHost(typeof(WcfProductService)))
{
host.Open();
Console.WriteLine("server is open");
}
在 app.config 上我定义了类似的 url
<endpoint address="http://localhost:9999/ProductSercie" binding="basicHttpBinding"
bindingConfiguration="" contract="IWcfProductService.IWcfProductService"
name="ProductServiceEndPoint" kind="" endpointConfiguration="" />
我在这个问题上搜索并尝试使用 netsh 在 cmd 上添加这个 url 但没有成功 看https://i.snag.gy/50tRok.jpg 请问我该怎么办? 谢谢
【问题讨论】:
标签: c# wcf app-config