<?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文件
楼主这个问题解决了吗,