我已经为web服务添加了代理到VS2008/.NET 3.5解决方案.构建客户端.NET时抛出此错误:
无法在ServiceModel客户端配置部分中找到引用合同"IMySOAPWebService"的默认端点元素.这可能是因为没有为您的应用程序找到配置文件,或者因为在客户端元素中找不到与此合同匹配的端点元素.
搜索此错误告诉我在合同中使用完整的命名空间.这是我的带有完整命名空间的app.config:
<client>
<endpoint address="http://192.168.100.87:7001/soap/IMySOAPWebService"
binding="basicHttpBinding" bindingConfiguration="IMySOAPWebServicebinding"
contract="Fusion.DataExchange.Workflows.IMySOAPWebService" name="IMySOAPWebServicePort" />
</client>
Run Code Online (Sandbox Code Playgroud)
我正在运行XP本地(我之所以提到这是因为一些谷歌点击提到win2k3)app.config被复制到app.exe.config,所以这也不是问题.
有线索吗?
在WCF中,有几种不同类型的基于HTTP的绑定:
这3个有什么不同?
特别是在功能/性能和兼容性方面有何不同?
我正在开发一个WCF Web服务,我使用WCF服务应用程序模板来做到这一点.
创建"WCF服务应用程序"是否满足此要求?通过WCF服务应用程序创建WCF服务库有什么好处?
我的本地计算机上运行的WCF服务正常运行.我把它放在服务器上,我收到以下错误:
接收到http://xx.xx.x.xx:8200/Services/WCFClient.svc的HTTP响应时发生错误 .这可能是由于服务端点绑定不使用HTTP协议.这也可能是由于服务器中止HTTP请求上下文(可能是由于服务关闭).有关详细信息,请参阅服务器日志.
我已经去了url中的服务,它正常工作.我正在为函数做的就是将一个字符串返回到一个图像名称,因此传递的数据不是很多.我已经跟踪了日志,它给了我相同的信息.这是我的客户端配置:
<binding name="basicHttpBinding_IWCFClient" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
allowCookies="false">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None" realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
<endpoint name="basicHttpBinding_IWCFClient"
address="http://localhost:4295/Services/WCFClient.svc"
binding="basicHttpBinding"
bindingConfiguration="basicHttpBinding_IWCFClient"
behaviorConfiguration="WCFGraphicManagementTool.Services.ClientBehavior"
contract="WCFClient.IWCFClient" />
Run Code Online (Sandbox Code Playgroud)
这是我的服务器配置:
<service behaviorConfiguration="WCFGraphicManagementTool.Services.WCFClientBehavior"
name="WCFGraphicManagementTool.Services.WCFClient">
<endpoint name="basicHttpBinding_IWCFClient"
address=""
binding="basicHttpBinding"
contract="WCFGraphicManagementTool.Contracts.IWCFClient" />
<endpoint
address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange" />
</service>
<behavior name="WCFGraphicManagementTool.Services.WCFClientBehavior">
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
<serviceThrottling maxConcurrentCalls="120" maxConcurrentSessions="120"
maxConcurrentInstances="120" />
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" /> …Run Code Online (Sandbox Code Playgroud) 我正在尝试将应用程序(客户端)连接到公开的WCF服务,但不是通过应用程序配置文件,而是通过代码.
我应该怎么做呢?
如何在WCF中使用超时?我知道您可以为客户端绑定配置sendTimeout和receiveTimeout.但它们如何运作?
MSDN将sendTimeout描述为:
TimeSpan值,指定为完成发送操作提供的时间间隔.该值应大于或等于零.默认值为00:01:00.
什么是发送操作/接收操作?
我是WCF的新手,想知道以下每个绑定的差异/优点/限制/等等:
net.pipe
net.tcp
http
Run Code Online (Sandbox Code Playgroud)
关于何时使用每个绑定和其他示例的支持场景将不胜感激.
我试图从我的客户端控制台应用程序访问服务器上的WCF服务进行测试.我收到以下错误:
呼叫者未通过该服务进行身份验证
我在用wsHttpBinding.我不确定服务期望的验证类型是什么?
<behaviors>
<serviceBehaviors>
<behavior name="MyTrakerService.MyTrakerServiceBehavior">
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
Run Code Online (Sandbox Code Playgroud)
更新
如果我<endpoint "basicHttpBinding" ... />在IIS 7.0托管的Windows 2008服务器上更改绑定(来自wsHttpBinding),则它可以正常工作
在WCF端点中,basicHttpBinding和wsHttpBinding有什么区别?什么时候应该使用?
我使用VS 2010开发了一个简单的WCF服务.我通过添加应用程序在IIS的默认网站中托管并设置物理路径
我试图浏览.svc文件,它给我以下错误:
" 无法读取配置节'protocolMapping',因为它缺少节声明 "

我尝试了很多解决方案,但它不起作用
我创建的WCF服务库有一个App.config:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
</appSettings>
<system.web>
<compilation debug="true" />
</system.web>
<!-- When deploying the service library project, the content of the config file must be added to the host's
app.config file. System.Configuration does not support config files for libraries. -->
<system.serviceModel>
<services>
<service name="EvalServiceLibrary.EvalService">
<clear />
<endpoint address="basic" binding="basicHttpBinding" contract="EvalServiceLibrary.IEvalService"
listenUriMode="Explicit">
<identity>
<dns value="localhost" />
<certificateReference storeName="My" storeLocation="LocalMachine"
x509FindType="FindBySubjectDistinguishedName" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" …Run Code Online (Sandbox Code Playgroud) wcf-binding ×10
wcf ×9
.net ×3
c# ×2
web-services ×2
.net-3.5 ×1
endpoint ×1
iis ×1
mtom ×1
net.tcp ×1
security ×1
timeout ×1
wcf-client ×1
wcf-endpoint ×1
wcf-security ×1