用于浏览器交互的WCF配置文件? [英] WCF Configuration File for Browser Interaction?
问题描述
我有一个简单的WCF 4.0服务,一些简单的方法和一个返回List的getter属性。连接到程序时,服务正常。吸气剂是在接口上定义服务合同的其他方法进行装饰。
I have a simple WCF 4.0 service with some simple methods and a property with a getter that returns List. The service works fine when connected to programatically. The getter is decorated as are the other methods on the Interface that define the service contract.
我的下一步是通过IE浏览器访问服务器,以便服务器/部署管理员可以在服务安装后做一个smoketest。
My next move is to make the service accessible via the IE web browser so server/deployment admins can do a "smoketest" after service installation.
目前这个工作正常:
http://localhost/myservice.svc?wsdl
但是我需要采取事情进一步,让这工作:
But I need to take things further and get this to work:
http://localhost/myservice.svc/SmokeTest
并在浏览器中显示结果,SmokeTest是一个带有getter的属性,可以返回我想要显示的列表浏览器。
and have results show in the browser, SmokeTest is the property with a getter that does stuff and returns the List I want to show in the browser.
到目前为止,我无法弄清楚我的配置应该是什么样子。所有的帮助赞赏。
So far I can't figure out what my config should look like. All help appreciated.
这是我在web.config中的所有服务。端点是myservice.svc:
This is all I have in the web.config for the service. The endpoint is 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>
推荐答案
相关问题,不能完成:
Invoking WCF services through a browser
这篇关于用于浏览器交互的WCF配置文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!