【发布时间】:2011-03-28 10:40:52
【问题描述】:
我想使用新的 .Net framework 4.0 功能“基于配置的激活”。
我把那几行写进了 web.config。
<system.serviceModel>
<serviceHostingEnvironment>
<serviceActivations>
<add factory="MyCompany.Core.Hosting.WcfHostFactory" relativeAddress="Greeting.svc" service="MyCompany.Core.Services.GreetingService, MyCompany.Core.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=1ccaa18r85yu07a4"/>
</serviceActivations>
</serviceHostingEnvironment>
</system.serviceModel>
但是当我尝试浏览 http://localhost/MyCompany.Core/Greeting.svc 时,浏览器显示“找不到资源。HTTP 404。您要查找的资源(或其依赖项之一)可能已被删除、更改名称或暂时不可用。请检查以下 URL 并确保其拼写正确。"
我该如何解决这个问题?
感谢您的帮助。
【问题讨论】:
标签: .net wcf configuration .net-4.0