无法访问服务器上托管的远程WCF web服务

无法访问服务器上托管的远程WCF web服务,wcf,iis-7,vb.net-2010,Wcf,Iis 7,Vb.net 2010,您好,我已在服务器计算机上部署了WCF web服务。我可以在浏览器中浏览它。但当我将其服务引用添加到开发机器上的web应用程序时,我得到了以下详细错误: 元数据包含无法解析的引用: 'http://ServerMachineName:500/ITCAMSWebService_deploy/Services/Authentication.svc?wsdl'. WSDL文档包含无法解析的链接。 下载“”时出错http://ServerMachineName:500/ITCAMSWebService_

您好,我已在服务器计算机上部署了WCF web服务。我可以在浏览器中浏览它。但当我将其服务引用添加到开发机器上的web应用程序时,我得到了以下详细错误:

元数据包含无法解析的引用: 'http://ServerMachineName:500/ITCAMSWebService_deploy/Services/Authentication.svc?wsdl'. WSDL文档包含无法解析的链接。 下载“”时出错http://ServerMachineName:500/ITCAMSWebService_deploy/Services/Authentication.svc?xsd=xsd0'. 基础连接已关闭:接收时发生意外错误。 无法从传输连接读取数据:远程主机强制关闭了现有连接。 远程主机已强制关闭现有连接 元数据包含无法解析的引用:'http://ServerMachineName:500/ITCAMSWebService_deploy/Services/Authentication.svc'. 内容类型应用程序/soap+xml;服务不支持字符集=utf-8
http://ServerMachineName:500/ITCAMSWebService_deploy/Services/Authentication.svc
。 客户端和服务绑定可能不匹配。 远程服务器返回错误:(415)无法处理消息,因为内容类型为“application/soap+xml”;字符集=utf-8' 不是预期的类型“text/xml”;字符集=utf-8'。。 如果服务是在当前解决方案中定义的,请尝试构建解决方案并再次添加服务引用

服务器上Web.config中生成的服务模型部分如下所示:

<system.serviceModel>
      <services>
          <service name="Authentication" behaviorConfiguration="Behavior_Authentication">
              <host>
                  <baseAddresses>
                      <add baseAddress="http://ServerMachineName:500/ITCAMSWebService_deploy/Services/Authentication.svc"></add>
                  </baseAddresses>
              </host>
              <endpoint address="" contract="IAuthentication" binding="basicHttpBinding" bindingConfiguration="ITCAMSWebService.IAuthentication" />

          </service>
      </services>
    <behaviors>


      <serviceBehaviors>
        <behavior>
          <!-- 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="true" />
            <dataContractSerializer maxItemsInObjectGraph="2147483646" />
        </behavior>
      </serviceBehaviors>


    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true" />
  </system.serviceModel>


请在地址中提供服务器的ip地址,而不是ServerMachineName,并检查客户端和服务器的绑定已解决!!!通过在服务器上添加对C:\Windows\Temp具有完全权限的
Everyone
用户。IIS需要在服务器上的Temp文件夹中生成元数据文件的权限。

如果您有权访问服务器,请在wcf服务的配置中启用跟踪。它将准确地告诉您出了什么问题。请检查您在服务器中提供的绑定。。。basicHttpBinding还是WsHttpBinding?我用web.config编辑了我的问题。我是WCF部署方面的新手。本节需要添加什么?如何在客户端和服务器上添加相同的内容?它避免了我添加对web应用程序本身的引用。因此,web应用程序web.config中不会生成任何内容。实际上,您只需要向IIS(IIS\U用户)授予写入权限。但是,在开发机器上让每个人都能完全访问,就可以完成这项工作