MVC3网站的子目录中有Wordpress [英] MVC3 web site with Wordpress in subdirectory

查看:36
本文介绍了MVC3网站的子目录中有Wordpress的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的托管计划包括1个站点.我已经在该站点上安装了MVC3项目,它正在按设计工作.现在,我想在同一站点的子目录中安装博客.我正在使用的博客是Wordpress.Wordpress已安装到MVC3站点上的子目录中.当我运行我在Wordpress博客上看到一个带有以下错误的.NET错误页面:

My hosting plan includes 1 site. I have installed a MVC3 project on that site and it is working as designed. Now I would like install a blog on the same site in a subdirectory. The blog I am using is Wordpress. Wordpress is installed to a subdirectory on the MVC3 site. When I run the Wordpress blog I get a .NET error page with the error:

'System.Web.Helpers,版本= 1.0.0.0,文化=中性,PublicKeyToken = 31bf3856ad364e35'无法加载"

"'System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded"

MVC3网站在 http://www.setlisthelper.com 上运行我希望博客站点在 http://www.setlisthelper.com/blog

The MVC3 site runs at http://www.setlisthelper.com I want the blog site to run at http://www.setlisthelper.com/blog

我认为当我进入博客目录时,MVC3正在寻找BlogController.IIS7或MVC3中是否有一个设置可让其保留博客目录而不使用.NET?

I assume MVC3 is looking for a BlogController when I go the blog directory. Is there a setting in IIS7 or MVC3 that tells it to leave the blog directory alone and not use .NET?

推荐答案

尝试将其添加到 Global.asax.cs 中的 RegisterRoutes 函数中:

try adding this to your RegisterRoutes function in Global.asax.cs:

routes.IgnoreRoute("{*blog}", new { blog = @"blog(/.*)?" });

您应该可以通过以下链接转到它: http://www.setlisthelper.com/blog/index.php

You should be able to go to it with link: http://www.setlisthelper.com/blog/index.php

这篇关于MVC3网站的子目录中有Wordpress的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆