Thursday, October 12, 2006

Accessing .Net Admin site interface without VS.Net


.Net Admin site interface be made available to the users without Visual Studio, Follow the following Steps.

1. Create a virtual directory that points to the web admin files.

VirtualDirectory: ASP.NetWebAdminFiles
MappedTo: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ASP.NETWebAdminFiles

2. Modify the properties of the virtual directory so that it is running under ASP.NET 2.0. (Properties > ASP.NET)

NOTE: if you are running 1.1 and 2.0 applications on the same server or site, you may have to set up a separate application pool for the 2.0 sites. If you get the notice, "Application Unavailable" then that is why.

3. While you are there, remove anonymous access to that virtual directory.

4. After that, you will be able to connect to the web admin tools using the following url syntax

http://localhost/ASP.NETWebAdminFiles/default.aspx?applicationPhysicalPath=XXX&applicationUrl=/YYY

Where,
XXX: - Application Physical Path
YYY: - Application URL


In Framework case, it is:

http://localhost/asp.netwebadminfiles/default.aspx?applicationPhysicalPath=C:\Plan\Construction\Framework\SBWebSite\&applicationUrl=/SBWebSite
OR http://mdc0514c/asp.netwebadminfiles/default.aspx?applicationPhysicalPath=C:\Plan\Construction\Framework\SBWebSite\&applicationUrl=/SBWebSite (for remotely)

Note:

· Here we donot have to specify the port number since we hosted Admin interface on IIS.
· Only do this if you are careful and for the right purposes, since you are exposing some administration capability.

· Although it isn't recommended, if you want to access web admin tool from a different/remote computer, then open the WebAdminPage.cs file from the C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ASP.NETWebAdminFiles\App_Code directory and comment the following code block:if (!application.Context.Request.IsLocal)
{
SecurityException securityException = new SecurityException((string)HttpContext.GetGlobalResourceObject("GlobalResources", "WebAdmin_ConfigurationIsLocalOnly"));

WebAdminPage.SetCurrentException(application.Context, securityException);

application.Server.Transfer("~/error.aspx");
}