【发布时间】:2013-11-21 18:20:17
【问题描述】:
我有一个 owin 中间件,它可以在我的开发机器 (win7) 上的 IIS7 上运行。 但是当部署到 2008 服务器时,页面返回 404
我像这样连接中间件
public static class AppBuilderExtensions
{
public static void InitTemplateStore(this IAppBuilder app, string templatePath, string fileMask)
{
TemplateStoreMiddleware.Init(templatePath, fileMask);
app.Map("/templates", subApp => subApp.Use<TemplateStoreMiddleware>());
}
}
使用中间件的代码可以在这里找到
https://github.com/AndersMalmgren/Knockout.Bootstrap.Demo
网站作为虚拟应用托管在 IIS 上的默认网站下
编辑:我是否需要在默认角色之外添加任何角色?
IIS 正在尝试使用错误的 StaticFile 处理程序,为什么会发生这种情况?
Module IIS Web Core
Notification MapRequestHandler
Handler StaticFile
Error Code 0x80070002
Requested URL http://localhost:80/knockout.bootstrap.demo/templates?root=shared
Physical Path C:\inetpub\knockout.bootstrap.demo\templates
Logon Method Anonymous
Logon User Anonymous
【问题讨论】:
-
我对 StaticFiles OWIN 模块有类似的问题:gist.github.com/koistya/9951731