如何配置wcf服务在不指向地址框中的svc文件的情况下查看测试页面?
我已经创建了一个可用的 wcf 服务。我已经浏览了有关 wcf 服务的页面 其中描述了消除默认wcf服务页面的过程。
在这里 https://github.com/geersch/WcfServiceMessage
除了这个作者的东西页面正在描述,我有一个问题。
他如何设法将 IIS 或 Web.config 配置为托管页面,地址为: http://localhost:8732/HelloWorld/ ?
在家里,我看到我的服务的唯一地址是:http://localhost:8732/MyServiceName.svc (带有 svc 扩展)
他是如何做到使用端点地址:“HellowWorld”的?
谢谢!
I have created a working wcf service. I have come a cross a page regarding wcf services
which describes the process for eliminating default wcf service page.
It is here https://github.com/geersch/WcfServiceMessage
Except for the things the author of this page is describing, I have one question.
How has he managed to configure the IIS or Web.config to host page with the address: http://localhost:8732/HelloWorld/ ?
At home, the only address I see my service at is: http://localhost:8732/MyServiceName.svc
(with svc extension)
How has he done it that the endpoint address: "HellowWorld" is used?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
WCF 服务端点实际上并不是一个文件。总 url 本身就是服务器识别为要提供服务的内容,因此 HelloWorld 部分与 HelloWorld.svc 一样好。
这是 IIS 托管服务与 Windows 或 Visual Studio 服务主机 (cassini) 之间的区别。在 iis 中,您必须指定一个以 svc 结尾的文件并告知该扩展名。在iis中,您还可以将svc文件设置为打开特定目录时默认打开的文件。这样你就可以实现相同的行为。
The WCF service endpoint is not actually a file. The total url itself is what the server recognizes as something to service, so the HelloWorld piece is just as good as HelloWorld.svc.
This is a difference between IIS hosted service and Windows or Visual Studio service host (cassini). In iis, you do have to specify a file that ends with svc and make that extension known. In iis you can also set a svc file as the default file to open if a specific directory is opened. that way you can achieve the same behavior.