问题描述
我有一个Windows服务,该服务调用了两个单独的WCF服务.
I have a Windows Service that calls two separate WCF services.
我已将以下配置添加到Windows服务中.
I have added the below configuration to my Windows Service.
但是,它无法处理此错误...没有端点在监听 https://mySite.com:443/wsg/Test.svc 可以接受该消息.
However, it is not working with this error...There was no endpoint listening athttps://mySite.com:443/wsg/Test.svc that could accept the message.
如果我通过Visual Studio中的控制台应用程序在本地调试,则可以正常工作.
If I debug locally though a Console App in Visual Studio it works fine.
这是Windows服务中我的App.config代码.我把这个设置弄错了吗?
Here is my App.config code in the Windows Service. Have I got this set wrong?
谢谢!
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="RNS">
<security mode="Transport">
<transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
<message clientCredentialType="Certificate" algorithmSuite="Default" />
</security>
</binding>
<binding name="BasicHttpBinding_ISSRSService" sendTimeout="00:12:00" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="https://mySite.com:443/wsg/Test.svc"
binding="basicHttpBinding" bindingConfiguration="RNS" contract="RNSClientProd.RNS"
name="RNS"/>
<endpoint address="http://Testiis01:7689/SSRSService.svc"
binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_ISSRSService"
contract="SSRSService.ISSRSService"
name="BasicHttpBinding_ISSRSService" />
</client>
</system.serviceModel>
推荐答案
>>如果我通过Visual Studio中的控制台应用程序在本地调试,则可以正常运行
您的配置文件在控制台应用程序和Windows服务中是否相同?如果它们相同,可以与我们分享创建Windows服务和WCF服务参考的详细步骤吗?您是否尝试过使用"BasicHttpBinding_ISSRSService"; 在Windows服务中?
Are your configure files same in console app and windows service? If they are the same, could you share us detailed steps you create windows service and wcf service reference? Did you tried with "BasicHttpBinding_ISSRSService" in Windows Service?
另外,此网站"mySite.com"是否托管在您的本地计算机上?我建议您更改Windows服务以使用您的用户凭据运行.
最好的问候
爱德华
这篇关于Windows Service中的WCF服务配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!