2010-11-16 65 views
2

我可以创建WebMatrix 3站点并通过http:// localhost:[PORT]/_Admin访问管理控制台。如何将WebMatrix _Admin页面添加到asp.net mvc网站?访问助手

[问题] 我似乎无法能够通过新创建的asp.net的MVC网站访问_admin页面,即在WebMatrix中主持。我想要访问Web Helpers。

有什么建议吗?

谢谢

帕乌

+0

为WebMatrix的网络助手的网址是http://go.microsoft.com/fwlink/?LinkID=205388 – 2010-11-16 16:36:13

+0

MVC不会在WebMatrix的内部工作工具。 – marcind 2010-11-17 02:39:03

回答

2

参考System.Web.WebPages.Administration.dll在C:\ Program Files文件(x86)的\微软ASP.NET ...网页

ApplicationPart将该程序集注册到虚拟路径“〜/ _admin”。

在Global.asax的例子的RegisterRoutes

public static void RegisterRoutes(RouteCollection routes) 
    { 
     ApplicationPart part = new ApplicationPart(
      typeof(System.Web.WebPages.Administration.SiteAdmin).Assembly, 
      "~/_admin"); 
     ApplicationPart.Register(part); 
     // initialize your route table bellow 
+0

(Y)感谢您发现我不确定为什么WebMatrix不直接支持它,即使Scott Hanselman在mix2011中展示 – 2011-05-06 12:47:56

相关问题