2010-10-13 188 views
0

我有一个简单的WCF 4.0服务,一些简单的方法和一个返回List的getter属性。该服务以编程方式连接时正常工作。 getter的装饰和界面上定义服务合同的其他方法一样。用于浏览器交互的WCF配置文件?

我的下一步是通过IE浏览器使服务可访问,以便服务器/部署管理员在安装服务后可以执行“smoketest”。

此工程目前:

http://localhost/myservice.svc?wsdl 

但我需要采取进一步的事情,并得到这个工作:

http://localhost/myservice.svc/SmokeTest 

,并有结果显示在浏览器中,SmokeTest是一个getter属性做的东西,并返回我想要在浏览器中显示的列表。

到目前为止我无法弄清楚我的配置应该是什么样子。所有帮助赞赏。

这是我在web.config中为该服务提供的所有内容。端点是myservice.svc:

<behaviors> 
    <serviceBehaviors> 
    <behavior > 
     <serviceMetadata httpGetEnabled="true" /> 
     <serviceDebug includeExceptionDetailInFaults="true"/> 
    </behavior> 
    </serviceBehaviors> 
</behaviors> 
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> 
    <services> 
     <service name="myservice.worker" > 
      <endpoint address="" binding="basicHttpBinding" contract="myservice.IServicio" /> 
     </service> 
    </services> 

回答

2

相关的问题,是什么,不能做一个解释:

Invoking WCF services through a browser

+0

制作一个WCF服务REST兼容给出了一些换免费的浏览器viewint /调试。现在我有一个问题让它在IIS5.1下运行。啊。但是,谢谢! – Snowy 2010-10-21 18:02:58