看看参数重载列表,,,, 如果你指定了 binding,address啥的那就是告诉wcf你要用编码方式进行配置
解决方案 »
- c#文件上传saveas报错有进程正在打开此文件
- C# 连接ACCESS数据库 如果数据库设置了密码怎么写代码
- 小问题!Customer ID: ALFKI Name:
- 搞晕了:通过普通html页面就无法上传文件?(Request.Files.Count=0)
- 一个中文问题
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!为何没人理,特送高分,见者有分!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- 如何在表格控件中快速显示大量的数据?
- C#中如何卸载窗体?
- C#控制IIS之拒绝访问问题,非常急
- 谁帮忙把vb.net程序段改为c#?,谢谢
- 为什么我重定向后不能正确执行bat文件
- Propertygrid 如何换行
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"></endpoint>
应该是用来对外发布元数据的。如果这样定义就可以<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<services>
<service name="WcfServiceLibrary.BasicMath" behaviorConfiguration="basicBehaviors">
<endpoint address="" binding="wsHttpBinding" contract="WcfServiceLibrary.IBasicMath"></endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"></endpoint>
<host>
<baseAddresses>
<add baseAddress="http://localhost:9099/mathServices"/>
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="basicBehaviors">
<serviceMetadata httpGetEnabled="true"></serviceMetadata>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
是不是发布了元数据后客户端就可以通过 http://localhost:9099/mathServices?wsdl 这种形式去调用呢? 但是我试了下好像只有定义了
<serviceMetadata httpGetEnabled="true"></serviceMetadata> 就可以通过 http://localhost:9099/mathServices?wsdl 去调用。不是很明白
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"></endpoint> 的作用。
是不是好了
是不是好了
加了它在使用svcUtil.exe 生成时使用
svcutil.exe http://localhost:9099/mathServices/mex /out:mexClient.cs /config:app.config
没加它时使用
svcutil.exe http://localhost:9099/mathServices /out:mexClient1.cs /config:app.config
1
生成的代码没啥区别啊。
谁能告诉我
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"></endpoint> 这个总结点有啥作用啊?
http://social.microsoft.com/Forums/zh-CN/wcfzhchs/thread/f54aede1-4ee3-4d2e-9e6e-109190eeb0a8
这个就好像把你家的号码登记到114上去了 让人家可以查询是否有wcf服务可用及相关信息