ASP.Net MVC 通配符映射 IIS 6.0 - 找不到页面
我在 IIS 6.0 中向我的网站添加了通配符映射,以便我的 MVC 应用程序正常工作,但现在我得到一个页面,无法为每个请求找到。插入通配符映射后,我无法浏览到我创建的测试 html 文件或任何路由。
当通配符映射关闭时,该网站工作正常,我创建了一个名为 .mvc 的应用程序扩展名,然后在我的路由中使用该扩展名,但我不喜欢在 URL 中使用该扩展名。
以下是我的设置、服务器和应用程序的一些亮点:
带有 IIS 6.0 的 Windows Server 2003:
.Net 3.5 SP1
MVC dll 的 Bin 部署
服务器上运行多个站点。这个特定的站点被设置为其自己的站点(而不是虚拟目录)。
该网站使用表单身份验证
设置通配符映射时,我取消选中“验证文件是否存在”并映射到 c:\windows\microsoft.net\framework\v2.0.050727\aspnet_isapi.dll。
I added wildcard mappings to my website in IIS 6.0 so that my MVC application works properly but now I get a page can not be found for every request. Once wildcard mappings are inserted I can not browse to a test html file I created or any of my routes.
The site works fine when the wildcard mappings are off and I create a application extention called .mvc which is then used in my routes however I woupld prefer not using the extension in the Url.
Here are some highlights of my setup, server, and application:
Windows Server 2003 with IIS 6.0:
.Net 3.5 SP1
Bin deployment for the MVC dll's
Server has mutiple sites running on it. With this particular one being set up as its own site (not a virtual directory).
The site uses forms authentication
When setting up the wildcard mappings I unchecked "verify file exists" and mapped to c:\windows\microsoft.net\framework\v2.0.050727\aspnet_isapi.dll.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Web 服务扩展指向 Framework64。一旦通配符映射指向正确的文件夹(framework64 而不是框架),它就起作用了。
The web service extensions where pointing to framework64. As soon as the wildcard mapping was pointing to the correct folder (framework64 instead of framework) it worked.
url重写可以帮助你解决问题。我已经实现了允许在任何 IIS 版本上部署 MVC 应用程序的解决方案,即使使用虚拟主机也是如此。
http://www.codeproject.com/KB/aspnet/ iis-aspnet-url-rewriting.aspx
Url rewriting can help you to solve the problem. I've implemented solution allowing to deploy MVC application at any IIS version even when virtual hosting is used.
http://www.codeproject.com/KB/aspnet/iis-aspnet-url-rewriting.aspx