【发布时间】:2010-09-14 21:45:44
【问题描述】:
我有一个 WCF 服务,它使用 Global.asax 文件来激活我的服务。所以,我的部署框上部署的虚拟目录看起来像
web.config 全球.asax - 其中包含 Services.dll 和 Services.pdb
Services.dll 是我的 Service.svc 和 Service.svc.cs 文件的编译位。
如何让这个设置在 IIS6 中工作?我的 Global.asax 看起来像:
public class Global : HttpApplication
{
void Application_Start(object sender, EventArgs e)
{
RegisterRoutes();
}
private void RegisterRoutes()
{
WebServiceHostFactory factory = new WebServiceHostFactory();
RouteTable.Routes.Add(new ServiceRoute("MyService", factory, typeof(MyService)));
}
}
有什么想法吗?这适用于 IIS7,因此我可以导航到 http://server/MyService/...
【问题讨论】:
标签: wcf iis-7 routing .net-4.0 iis-6