[wcf] “System.ServiceModel.DiagnosticUtility”的类型初始值设定项引发异常。

[复制链接]
查看11 | 回复1 | 2010-12-1 16:40:32 | 显示全部楼层 |阅读模式
ServiceReference1.WCFToSqlClient client;

string baseaddress = "http://localhost:8000/WCFToSql/WCFToSql";

EndpointAddress endpointaddress = new EndpointAddress(baseaddress);

WSHttpBinding binding = new WSHttpBinding(SecurityMode.None)

{

ReaderQuotas = XmlDictionaryReaderQuotas.Max,

MaxBufferPoolSize = 0x80000 * 2,

MaxReceivedMessageSize = int.MaxValue

};

client = new WindowsFormsApplication1.ServiceReference1.WCFToSqlClient(binding, endpointaddress);//这里出错

client.Open();
在大部分电脑都是可以用的!但是有一些电脑电脑就会提示System.ServiceModel.DiagnosticUtility”的类型初始值设定项引发异常。
请高手帮忙看看!
没有的!我已经把net framework删除重装了还是不行!

回复

使用道具 举报

千问 | 2010-12-1 16:40:32 | 显示全部楼层
可能你这个电脑安装.net framework的时候有异常,非正常安装。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行