首页 新闻 会员 周边

在IIS下发布服务后,在浏览器中打开服务后,我在客户端添加服务引用时候输入地址,找不到服务,这种情况您

0
悬赏园豆:100 [待解决问题]

在IIS下发布服务后,在浏览器中打开服务后,我在客户端添加服务引用时候输入地址,找不到服务,这种情况您遇到过吗?

服务截图

 

引用服务报错:

白桦叶58的主页 白桦叶58 | 初学一级 | 园豆:102
提问于:2013-07-05 17:05
< >
分享
所有回答(10)
0

mark

在大地画满窗子 | 园豆:102 (初学一级) | 2013-07-05 17:07

什么意思?

支持(0) 反对(0) 白桦叶58 | 园豆:102 (初学一级) | 2013-07-05 17:17

@白桦叶58: 呵呵,现在看不到你上传的图片,晚上回家后再看。

支持(0) 反对(0) 在大地画满窗子 | 园豆:102 (初学一级) | 2013-07-05 17:18

@在大地画满窗子: 非常感谢你

支持(0) 反对(0) 白桦叶58 | 园豆:102 (初学一级) | 2013-07-05 17:47
0

发布的IIS不应该是locahost,使用IP地址吧。

Astar | 园豆:40805 (高人七级) | 2013-07-05 17:40

换成IP地址也不行。

支持(0) 反对(0) 白桦叶58 | 园豆:102 (初学一级) | 2013-07-05 17:49

@白桦叶58: 在你的程序中,哪里有Service1.svc这个???没有这个,当然访问不到

支持(0) 反对(0) IT追风者 | 园豆:204 (菜鸟二级) | 2013-07-10 10:50
0

有没有发布元数据呀。

有一点难 | 园豆:225 (菜鸟二级) | 2013-07-05 20:26

发布了

支持(0) 反对(0) 白桦叶58 | 园豆:102 (初学一级) | 2013-07-05 20:40
-1

添加web引用 看看  webservice 和 wcf是不一样的

Tom.汤 | 园豆:3028 (老鸟四级) | 2013-07-06 13:34
-1

你重新生成一次,然后再引用一次此webservice,或者是你的配置文件不是本地的。

妍珊 | 园豆:1169 (小虾三级) | 2013-07-06 14:22
-1

明显是找不到地址

新月腾 | 园豆:114 (初学一级) | 2013-07-07 23:25
-1

应该是配置文件不对啊,找不到那个WCF的元数据,应该是没有配置元数据的获取方式: <serviceMetadata httpGetEnabled="true" />这个配置要有。

      <serviceBehaviors>
        <behavior name="BLAjaxServiceBehaviors">
          <serviceThrottling maxConcurrentCalls="500" maxConcurrentSessions="500" maxConcurrentInstances="500" />
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />
          <dataContractSerializer maxItemsInObjectGraph="2147483647" />
        </behavior>
      </serviceBehaviors>

燕歌(Mick) | 园豆:202 (菜鸟二级) | 2013-07-08 18:28

你好,这个是我的配置

支持(0) 反对(0) 白桦叶58 | 园豆:102 (初学一级) | 2013-07-09 18:21

@白桦叶58: 你建的WCF程序,根本就是错的

支持(0) 反对(0) IT追风者 | 园豆:204 (菜鸟二级) | 2013-07-10 10:48

@白桦叶58: 你参照下面添加一个<basicHttpBinding>绑定吧,里面有个textEncoding="utf-8"这个属性,看你那报的错误信息,好像是这个原因。

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.serviceModel>
    <services>
      <service name="SCMWholeWCF.BLL.Services.ServiceTest" behaviorConfiguration="BLAjaxServiceBehaviors">
        <endpoint address="" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding" contract="Vancl.SCMS.Services.IServiceTest" />
      </service>
    </services>
    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding" closeTimeout="00:05:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true" messageEncoding="Text">
          <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>
      </basicHttpBinding>
    </bindings>
    <behaviors>
      <serviceBehaviors>
        <behavior name="BLAjaxServiceBehaviors">
          <serviceThrottling maxConcurrentCalls="500" maxConcurrentSessions="500" maxConcurrentInstances="500" />
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />
          <dataContractSerializer maxItemsInObjectGraph="2147483647" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
</configuration>
支持(0) 反对(0) 燕歌(Mick) | 园豆:202 (菜鸟二级) | 2013-07-11 12:09
0

看你服务的相关文件 是不是存在 相同的方法名,换成别的名字 试试.

码半仙 | 园豆:7 (初学一级) | 2013-07-09 16:33
0

地址应该是元数据地址把

lu200852 | 园豆:214 (菜鸟二级) | 2013-07-09 17:09
0

第一步:在浏览器中输入:http://192.168.0.110:8080/Service1.svc,看一下能不能访问,如果成功,会出现这样的提示:“

You have created a service.

To test this service, you will need to create a client and use it to call the service. You can do this using the svcutil.exe tool from the command line with the following syntax:

”;如果不能,则你发布到IIS的时候,config没有设置正确

IT追风者 | 园豆:204 (菜鸟二级) | 2013-07-10 10:38
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册