7

Is there a short cut method to open website administrator in visual studio 2013, other than the method specified below

http://blogs.msdn.com/b/webdev/archive/2013/08/19/asp-net-web-configuration-tool-missing-in-visual-studio-2013.aspx

4

2 回答 2

8
  1. 通过Windows Explorer,将文件夹ASP.NETWebAdminFiles及其所有内容复制到您的解决方案文件夹(WebApplications 的根文件夹)。

    ASP.NETWebAdminFiles存在于%systemroot%\Microsoft.NET\Framework\v4.0.30319\

    %systemroot%通常指C:\Windows

  2. VS2013+ \ Solution Explorer Window上,右键单击您的解决方案名称;浏览Add ,在扩展菜单上单击Existing Web Site...项。

  3. 在打开的对话框中,在左窗格中选择File System,在右窗格中浏览到您的解决方案文件夹并选择ASP.NETWebAdminFiles然后单击打开按钮。

  4. 在添加的网站中,在文件夹App_Code中,找到并打开WebAdminPage.cs然后:

    4.1。查找类WebAdminPage,查找OpenWebConfiguration 具有 3 个参数的方法,将最后一行代码替换为:

    return WebConfigurationManager.OpenMappedWebConfiguration(fileMap, path, "localhost");
    

    您可以使用domain nameorIP Address代替localhost

    4.2. 查找类WebAdminModule,查找方法SetSessionVariables,查找第一个if块:

    if (application.Context.Request != null) { ... }
    

    if块内,将两行代码替换为:

    queryStringAppPath = "/";
    queryStringApplicationPhysicalPath = @"D:\PHYSICAL\PATH\OF\YOUR\MAIN\WEB\APPLICATION\";
    

    4.3. 确保提供的物理路径以 BACKSLASH 结尾。

    4.4. []如果你要localhost在类上运行这个工具WebAdminModule,找到方法OnEnter然后找到第一个if块:

    if (!application.Context.Request.IsLocal) {...}
    

    将整个块作为注释文本:

    //if (!application.Context.Request.IsLocal) {...}
    

    4.5. 在VS2013+\Solution Explorer Window上,单击ASP.NETWebAdminFiles,在Properties Window上将Windows Authentication设置为Enabled然后将Anonymous Authentication设置为Disabled

    4.6. 将ASP.NETWebAdminFiles网站设置为启动项目,然后运行它。

  5. 它可以工作,我将它用于 Intranet 和 Web 上的应用程序。

祝你好运。

于 2014-07-25T20:39:36.383 回答
3

经过漫长的等待,这里是 ASP.NET 网站管理员工具的替代品:

Thinktecture.IdentityManager 作为 ASP.NET 网站管理工具的替代品

从那时起,ASP.NET 引入了 ASP.NET Identity,社区成员 Brock Allen 创建了 IdentityReboot,并进行了一些重大改进和扩展。Brock Allen 和 Dominick Baier 更进一步,创建了 Thinktecture IdentityManager。这是缺少的 ASP.NET 网站管理工具的一个很好的引导式替代品的开始。它很好地分解并支持 ASP.NET Identity 及其替代方案,称为 MembershipReboot。

希望这可以帮助。

于 2014-02-25T23:20:10.060 回答