首页 新闻 会员 周边 捐助

wcf服务自定义的终结点访问地址无效?求解

0
悬赏园豆:20 [已关闭问题] 关闭于 2015-07-10 17:39
<?xml version="1.0"?>
<configuration>
 <system.serviceModel>
  <behaviors>
   <serviceBehaviors>
    <behavior name="WebApplication1.Service1Behavior">
     <serviceMetadata httpGetEnabled="true" />
     <serviceDebug includeExceptionDetailInFaults="true" />
    </behavior>
   </serviceBehaviors>
  </behaviors>
  <services>
   <service behaviorConfiguration="WebApplication1.Service1Behavior"
    name="WebApplication1.Service1">
     
     <endpoint address="/test" binding="wsHttpBinding" contract="WebApplication1.IService1">
</endpoint>
     <endpoint address="/hello" binding="wsHttpBinding" contract="WebApplication1.IService1">
 </endpoint>
     <host>
       <baseAddresses>
         <add baseAddress="http://www.testwcf.com/ServiceModelSamples/service"/>
       </baseAddresses>
     </host>

     <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
   </service>
  
  </services>
 </system.serviceModel>
</configuration>

我是.Net 3.5

发布在iis 的wcf服务, 本地域名配置为http://www.testwcf.com

想通过上面配置文件的里url

(如

http://www.testwcf.com/ServiceModelSamples/service/hello
,或
http://www.testwcf.com/ServiceModelSamples/service/test

)

访问,但是访问不了,这是为什么啊? 或哪里博客有讲这个内容的

http://www.testwcf.com/service.svc  这个地址能访问!

service.svc  是建立wcf文件

wcf
koi的主页 koi | 初学一级 | 园豆:4
提问于:2015-07-08 17:59
< >
分享
所有回答(1)
0

楼主这个问题解决了吗,

富坚老贼 | 园豆:202 (菜鸟二级) | 2018-11-24 07:53
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册