asp.net mvc 2 iis7 集成 windows7 vs2010 的空白页/路由问题
我一直在搜索大量帖子,但似乎仍然无法得到直接答案或至少一个对我有用的答案。据我所知,这是某种路由问题。事实上我对此非常确定。当我访问任何网页时,它都会返回一个没有数据的空白页面。
另外我在window7上使用VS2010 asp.net mvc2,使用iis7集成。使用iis7集成的目的是因为当我将网站发布到godaddy托管提供商时,我希望能够在本地复制安全权限,这样在发布网站后不应出现任何意外的问题。
我尝试使用此处描述的 Default.aspx 技巧 ASP.net MVC在 IIS 7 上返回空白页面,但同样的问题仅显示根页面,并且没有其他可用的路由。
我也尝试过创建一条此处描述的空路线 路由到 mvc asp 中的空白请求。 NET 使用 IIS 6.0 在这里 我在部署 MVC 应用程序时遇到空白页面在 IIS 上
我还使用此处找到的路由调试器 http://haacked.com/archive/2008/03/ 13/url-routing-debugger.aspx
当我访问 http://localhost/ 时使用路由调试器仍然得到一个没有数据的空白页。但是当我访问 http://localhost/Home.aspx 时,路由调试器就会启动并显示以下
< a href="http://j.imagehost.org/0476/routes.png" rel="nofollow noreferrer">http://j.imagehost.org/0476/routes.png
当我添加
路线 时.MapRoute("Default2", "", new {controller = "Home", action = "Index" });
高于或低于包罗万象的路线
routes.MapRoute( "默认", // 路由名称 "{controller}/{action}/{id}", // 带参数的 URL 新{控制器=“主页”,操作=“索引”,id=UrlParameter.Optional}); // 参数默认值,
当我访问 http://localhost/ 时,它会执行相同的操作空白页面,但我仍然得到一个空白页面没有数据。当我访问 http://localhost/Home.aspx 时,路由调试器启动并显示以下
http://a.imagehost.org/0115/routes2.png
还有其他吗我可以尝试让我的页面正常显示吗?似乎很多人都遇到同样的问题,但是对于iis6 classic或更旧的mvc版本,很少有人看到关于我使用iis7集成在window7上配置VS2010 asp.net mvc2时遇到空白页面问题的帖子。
非常感谢任何帮助!
I've been searching though a number of posts and still can't seem to get a straight answer or at least one that works for me. From what I can tell is is some kind of routing issue. In fact I'm pretty certain of it. When I visit any of my web pages it comes back as a blank page with no data.
Also I am using VS2010 asp.net mvc2 on window7 using iis7 integrated. The purpose of using iis7 integrated is because when I publish the site to my godaddy hosting provider I want to be able to replicate the security permissions locally so after publishing the site should not have any surprise issues that pop up.
I tried using the Default.aspx trick described here ASP.net MVC on IIS 7 returning blank page but the same problem only the root page gets displayed and no other routes are available.
I have also tried crating a empty route described here
routing to blank request in mvc asp.net using IIS 6.0
and here
I am getting a blank page while deploying MVC application on IIS
I am also using the Route debugger found here
http://haacked.com/archive/2008/03/13/url-routing-debugger.aspx
Using the Route debugger when I visit http://localhost/ I still get a blank page with no data. But When I visit http://localhost/Home.aspx the route debugger then kicks in and displays the fallowing
http://j.imagehost.org/0476/routes.png
When I add
routes.MapRoute("Default2", "", new { controller = "Home", action = "Index" });
above or below the catchall route
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = UrlParameter.Optional }); // Parameter defaults
it does the same thing blank page when I visit http://localhost/ I still get a blank page with no data. And when I visit http://localhost/Home.aspx the route debugger kicks in and displays the fallowing
http://a.imagehost.org/0115/routes2.png
Is there anything else that I can try to get my pages to display properly? Seems like a lot of people are having the same issue but with iis6 classic or older mvc versions have have seen very few posts about people having blank page issue with my configuration of VS2010 asp.net mvc2 on window7 using iis7 integrated.
Any help is greatly apreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
必须将“HTTP 错误”和“HTTP 重定向”服务添加到“Web 服务器 (IIS) 角色”。如果您不想让 CSS 和 Javascript 等静态内容也正常工作,请同时启用“静态内容”服务。
"HTTP Errors" and "HTTP Redirection" services must be added to "Web Server (IIS) role. If you wan't to get static content like CSS and Javascript working, too, enable "Static Content" service as well.