在iis 7.0中托管wcf服务 [英] Hosting wcf service in iis 7.0

查看:55
本文介绍了在iis 7.0中托管wcf服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,

我在iis中托管了我的wcf服务,我的服务是:http://localhost/MyWcfService/Service1.svc?wsdl。但是当我向应用程序添加服务引用时会出现错误



错误是:



  元数据包含无法解析的引用:http:// localhost / MyWcfService /Service1.svc?wsdl。
WSDL文档包含无法解析的链接。
下载http://localhost/MyWcfService/Service1.svc?xsd = xsd0时出错。
基础连接已关闭:接收时发生意外错误。
无法从传输连接读取数据:远程主机强行关闭现有连接。
强制关闭现有连接远程主机





请帮助......



是否需要代理创建?我还没有创建代理。

解决方案

可能是服务配置的问题。



< pre lang =c#>< system.servicemodel>
< services>
< service name = WcfService_using_callbacks_via_tcp.Service1 >
behaviorConfiguration = Behavior_Service1 >
< host>
< baseaddresses>
< add baseaddress = net.tcp:// localhost:5050 / Service1 />
< / baseaddresses >
< / host >
< endpoint address = contract = WcfService_using_callbacks_via_tcp.IService1 >
binding = netTcpBinding bindingConfiguration = DuplexNetTcpBinding_IService1 />
< endpoint address = mex contract = IMetadataExchange binding = mexTcpBindng />
< / endpoint > < / 服务 >
< / 服务 >
...
< / system.servicemodel >





欲了解更多信息: SOF



我希望这个对你有帮助。


请在这里查看解决方案 http://social.msdn.microsoft.com/Forums/vstudio/en-US/ec8429cc-387c-4bdd-ac59-69b37313d730/wcf-help-needed-metadata-contains-a-reference-that-c​​annot -be-resolved-nettcplocalhost [ ^ ]。希望它有所帮助


Dear All,
I have been hosted my wcf service in iis, My Service is: http://localhost/MyWcfService/Service1.svc?wsdl. but when I am adding service reference to an application there is raising an error

The error IS:

"Metadata contains a reference that cannot be resolved: http://localhost/MyWcfService/Service1.svc?wsdl.
The WSDL document contains links that could not be resolved.
There was an error downloading http://localhost/MyWcfService/Service1.svc?xsd=xsd0.
The underlying connection was closed: An unexpected error occurred on a receive.
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
An existing connection was forcibly closed by the remote host"



Kindly help...

Is proxy creation necessary ? I have not created the proxy yet.

解决方案

May be the problem with service configuration.

<system.servicemodel>
  <services>
    <service name="WcfService_using_callbacks_via_tcp.Service1">
      behaviorConfiguration="Behavior_Service1">
      <host>
        <baseaddresses>
          <add baseaddress="net.tcp://localhost:5050/Service1" />
        </baseaddresses>
      </host>
      <endpoint address="" contract="WcfService_using_callbacks_via_tcp.IService1">
         binding="netTcpBinding" bindingConfiguration="DuplexNetTcpBinding_IService1" />
      <endpoint address="mex" contract="IMetadataExchange" binding="mexTcpBindng" />
    </endpoint></service>
  </services>
  ...
</system.servicemodel>



For more info : SOF

I hope this will help to you.


Please kindly check the solution here http://social.msdn.microsoft.com/Forums/vstudio/en-US/ec8429cc-387c-4bdd-ac59-69b37313d730/wcf-help-needed-metadata-contains-a-reference-that-cannot-be-resolved-nettcplocalhost[^]. Hope it helps


这篇关于在iis 7.0中托管wcf服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆