我有一个简单的ASP MVC项目。 在这个站点下,我需要显示纯净的.html文件,而不会将路线视为控制器/操作。ASP MVC允许静态HTML文件
我有文件夹文档与文件index.html在里面。 我需要下www.mydomain.com/documentation这个访问,则返回403 目前它只能在www.mydomain.com/documentation/index.html
我已经加入
routes.Ignore("developers/");
RouteConfig.cs
成
并Startup.cs
为OwinAppBuilder
app.UseStaticFiles();
我该怎么办才能使用www.mydomain.com/documentation/index.html?
你能够提供其他静态文件,如.js和.png吗?你运行的是哪个版本的IIS? – Sam07
也不是Core?对于核心看到:http://stackoverflow.com/a/41093539/240564 – Alexan
以及我可以实际显示该文件,问题是,我需要明确写入“index.html”到URL ...当我禁用所有的MVC ,并有网站运行,一切正常 – Maarty