摘要: Uri uri = new Uri("http://localhost:6580/Service1.svc?wsdl"); MetadataExchangeClient mexClient = new MetadataExchangeClient(uri, MetadataExchangeClie... 阅读全文
posted @ 2014-04-15 13:16 Zengbin 阅读(546) 评论(0) 推荐(0) 编辑
摘要: A.创建证书:(1)将创建证书工具makecert.exe放到任意地方。可以把该文档中的makecert.exe工具复制粘贴到任意目录。(2)doc命令去到makecert.exe的路径,然后输入命令makecert -sr localmachine -ss My -n CN=DeferredTop... 阅读全文
posted @ 2014-03-31 15:22 Zengbin 阅读(1841) 评论(0) 推荐(1) 编辑
摘要: 服务发布了wcf服务后,在客户端引用发现出现以下错误- 来自“DISCO 文档”的报告是“下载“https://servername:8004/TerminalHandler.svc?disco”时出错。”。 - 无法解析此远程名称: 'servername'- 来自“WSDL 文档”的报告是“无法识别此文档格式(内容类型为“text/html; charset=UTF-8”)。”。原因是在调用wcf服务的时候,wcf 在发现服务器的时候会根据机器名去找服务,但是如果在外网调用的时候,会出现找不到的情况,所以需要在服务器的iis做个小小变动。去到系统目录下C:\Windows\ 阅读全文
posted @ 2014-03-31 14:53 Zengbin 阅读(421) 评论(0) 推荐(0) 编辑
摘要: 在64位Win7操作系统中安装Microsoft Access Engine的解决方案现在的Win7系统中安装的一般都是32位的Office,因为微软推荐使用32位的Office,兼容性更强,稳定性更好。在使用Access作为数据库的时候,C#操作Access,如果Access是accdb,那么一切会很顺利,Win7系统中有访问accdb的相应的组件,使用C#调用就可以。如果是mdb,以往在XP上是使用Jet方式访问,而在Win7上已经不推荐使用Jet, 因为Win7系统本身就不带Jet的组件。从而出现了一个替代品Microsoft Access Engine,通过ACE的方式访问Access 阅读全文
posted @ 2014-02-19 14:00 Zengbin 阅读(3577) 评论(0) 推荐(0) 编辑
摘要: 数据库服务器做了镜像之后,发现有错误信息The server instance Witness rejected configure request; read its error log file for more information. The reason 1427, and state 31, can be of use for diagnostics by Microsoft. This is a transient error hence retrying the request is likely to succeed. Correct the cause if any and 阅读全文
posted @ 2014-01-13 12:32 Zengbin 阅读(767) 评论(0) 推荐(0) 编辑
摘要: 最近在配置WCF的时候,需要一点麻烦,避免以后才出现错误,特记录起来1.wcf需要使用用户名和X509证书验证A.服务器的config配置 a.bindings/binding中使用说明: mode等于Message可以不用https方式。 b.service中 中,需要确认binding是否为http说明: http的binding为mexHttpBinding,而https的binding为mexHttpsBindingc.behaviors/serviceBehaviors/behavior需要设置证书的位置d.behaviors/serviceBehaviors/behavior需要设 阅读全文
posted @ 2013-11-06 13:46 Zengbin 阅读(524) 评论(0) 推荐(0) 编辑
摘要: A.makecert -sr localmachine -ss My -n CN=TopupProxyServer -sky exchange -pe -r B.检索证书的指纹 ,证书名TopupProxyServer C.设置 wsHttpBinding.binding的security mode为TransportWithMessageCredential;clientCredentialType为UserName --> D.设置下的 service的binding="wsHttpBinding" bindingConfiguration="WSHtt 阅读全文
posted @ 2013-11-06 11:36 Zengbin 阅读(505) 评论(0) 推荐(0) 编辑
摘要: 错误提示:Could not load file or assembly 'lua51' or one of its dependencies. An attempt was made to load a program with an incorrect format.在iis使用了Lua的dll lua51.dll,发现打开网页的时候提示以上错误信息。原因:lua51是在32机器上编译的,而服务器是64位机器。处理方式:将iis的应用程序池改成允许使用32位就好。 阅读全文
posted @ 2013-11-06 10:54 Zengbin 阅读(1000) 评论(0) 推荐(0) 编辑
摘要: 为了分布式和多客户端调用我们还需要将写好的COM组件发布到一台服务器上。这里我们将组件部署到操作系统的COM+应用程序中去。如果没此需要就可以导出后,在C++环境中调用COM了。 第一步:导出COM组件。我们可以使用regasm.exe(导出并在本机注册)或tlbexp.exe(只导出不注册,在C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727中,也可以拷贝到你要的目录中,以前1.1时不行的,还需要调用vsvars32.bat才可以使用)我们也写各bat文件。gacutil -i SayHello.dll(将强命名的程序集添加到全局缓存中去,不然在运行的 阅读全文
posted @ 2013-10-29 13:37 Zengbin 阅读(1179) 评论(0) 推荐(0) 编辑
摘要: c# 获取命名空间 类名 方法名转[http://blog.sina.com.cn/s/blog_3fc2dcc1010189th.html]分类: Winformpublic static string GetMethodInfo() { string str = ""; //取得当前方法命名空间 str += "命名空间名:"+System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Namespace + "\n"; ... 阅读全文
posted @ 2013-10-22 14:43 Zengbin 阅读(915) 评论(0) 推荐(0) 编辑