ASP.NET Website Administrator Tool in VS 2013

asp.net

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

Best Answer

  1. By Windows Explorer, copy folder ASP.NETWebAdminFiles and all its content to your solution folder (root folder of your WebApplications).

    ASP.NETWebAdminFiles exists in %systemroot%\Microsoft.NET\Framework\v4.0.30319\

    %systemroot% usually refers to C:\Windows

  2. On VS2013+ \ Solution Explorer Window, do right click on your solution name; go over Add, on expanded menu click on Existing Web Site... item.

  3. On opened dialog, on left pane choose File System, on right pane browse to your solution folder and select ASP.NETWebAdminFiles then click on Open button.

  4. In added web site, in folder App_Code, find and open WebAdminPage.cs then:

    4.1. find class WebAdminPage , find method OpenWebConfiguration that has 3 parameters, replace last line of code with this:

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

    you can use domain name or IP Address instead of localhost

    4.2. find class WebAdminModule, find method SetSessionVariables, find first if block:

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

    inside if block, replace two lines of codes with these:

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

    4.3. Make sure provided physical path ends with a BACKSLASH.

    4.4. [NEW] if you going to run this tool on localhost, in class WebAdminModule, find method OnEnter then find first if block:

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

    make whole of block as commented text:

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

    4.5. On VS2013+ \ Solution Explorer Window, click on ASP.NETWebAdminFiles, on Properties Window set Windows Authentication as Enabled then set Anonymous Authentication as Disabled.

    4.6. Set ASP.NETWebAdminFiles website as StartUp Project then run it.

  5. It works, I use it for my applications over Intranet and web.

Good luck.