某些解决方案中的WCF超时
问题是,当我在VS2012中创建一个新的解决方案并添加wcf的服务引用时,一切正常。但是,当我向我的一个项目添加相同的服务引用时,这些方法会收到超时异常。问题可能是,当我向项目添加引用时,VisualStudio直到取消选中“在引用的程序集中重用类型”选项后才创建代码。我检查了配置文件,但没有发现任何差异。我仍然包含配置文件的一部分:某些解决方案中的WCF超时,wcf,web-services,visual-studio,web-config,timeout,Wcf,Web Services,Visual Studio,Web Config,Timeout,问题是,当我在VS2012中创建一个新的解决方案并添加wcf的服务引用时,一切正常。但是,当我向我的一个项目添加相同的服务引用时,这些方法会收到超时异常。问题可能是,当我向项目添加引用时,VisualStudio直到取消选中“在引用的程序集中重用类型”选项后才创建代码。我检查了配置文件,但没有发现任何差异。我仍然包含配置文件的一部分: <system.serviceModel> <client> <endpoint address="url" bindi
<system.serviceModel>
<client>
<endpoint address="url"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService"
contract="NewsBannersCampaignService.IService" name="BasicHttpBinding_IService" />
</client>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IService" />
</basicHttpBinding>
<wsHttpBinding>
<binding name="DefaultBinding">
<security mode="Message">
<message clientCredentialType="UserName" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="DefaultBehavior" name="project.Services.Integration">
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="DefaultBinding" name="Integration" contract="project.Services.IIntegration" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
编辑:适用于可能存在此问题的任何人;我的问题是我忘了删除配置文件中的defaultProxy设置。删除后一切正常。我刚刚删除了
<system.net>
<defaultProxy>
<proxy proxyaddress="http://address" bypassonlocal="True" />
</defaultProxy>
</system.net>