Rahul Soni's blog

Never assume the obvious is true!

How to use Web Site Administration Tool without installing VS 2005

How to use Web Site Administration Tool without installing VS 2005

  • Comments 30

Hello everyone!! This one is a tweak to ensure that you are able to Administer your ASP.NET 2.0 web-site *without* installing Visual Studio 2005 on your IIS Server.

For that, you would need Framework 2.0 installed on your Server. If you don't have it, please install it from http://msdn.microsoft.com/netframework/downloads/updates/default.aspx.

Now, follow the instructions below...

1) In the box where you have VS 2005 installed, open an application which you want to Administer.
2) I am using File System to open the website and have called it WebSiteAdminister
3) Click on the ASP.NET Configuration button in your Solution Explorer's toolbox
4) Copy the URL (in my case, it is... http://localhost:2002/asp.netwebadminfiles/default.aspx?applicationPhysicalPath=C:\Inetpub\wwwroot\WebSiteAdminister\&applicationUrl=/WebSiteAdminister)
5) Now, go to the IIS Box where you don't have VS 2005 installed
6) Open IIS console (Click on Start -> Run, type Inetmgr and click OK)
7) Right-Click on your Default Web Site and say New -> Virtual Directory
8) Click on Next, give an Alias (WebSiteAdmin) and click Next
9) In the Directory text box browse to... "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ASP.NETWebAdminFiles" and click Next, Next and Finish
10) Right-click on WebSiteAdmin and hit properties
11) Click on the ASP.NET Tab and select 2.0.50727 as ASP.NET Version and click Ok
12) Copy the content of the website from the Development box to the IIS Server (I did it at "c:\inetpub\wwwroot\WebSiteAdminister")
13) Open an instance of Internet Explorer and in the Address Bar type... http://localhost/WebSiteAdmin/default.aspx?applicationPhysicalPath=C:\Inetpub\wwwroot\WebSiteAdminister\&applicationUrl=/WebSiteAdminister
14) You should be able to see ASP.NET Web Site Administration Tool (You can bookmark this so that you don't have to remember that string)
15) As you can see, we have removed the port number (2002) and changed asp.netwebadminfiles to our application WebSiteAdmin.

By the way, just to bring it to your notice, Administering you web site using the above technique is NOT supported at Microsoft. For support options at Microsoft, please visit... http://www.microsoft.com/services/microsoftservices/srv_support.mspx

Hope that helps!!

  • Trackback from dotnetkicks.com
  • Excellent. It actually works. Well done.
  • Hi,

    I got the following error, any ideas why?

    The following message may help in diagnosing the problem: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: site at System.Web.Configuration.WebConfigurationHost.InitForConfiguration(String& locationSubPath, String& configPath, String& locationConfigPath, IInternalConfigRoot configRoot, Object[] hostInitConfigurationParams) at System.Configuration.Configuration..ctor(String locationSubPath, Type typeConfigHost, Object[] hostInitConfigurationParams) at System.Configuration.Internal.InternalConfigConfigurationFactory.System.Configuration.Internal.IInternalConfigConfigurationFactory.Create(Type typeConfigHost, Object[] hostInitConfigurationParams) at System.Web.Configuration.WebConfigurationHost.OpenConfiguration(WebLevel webLevel, ConfigurationFileMap fileMap, VirtualPath path, String site, String locationSubPath, String server, String userName, String password, IntPtr tokenHandle) at System.Web.Configuration.WebConfigurationManager.OpenWebConfigurationImpl(WebLevel webLevel, ConfigurationFileMap fileMap, String path, String site, String locationSubPath, String server, String userName, String password, IntPtr userToken) at System.Web.Configuration.WebConfigurationManager.OpenMappedWebConfiguration(WebConfigurationFileMap fileMap, String path) at System.Web.Administration.WebAdminPage.OpenWebConfiguration(String path, String appPhysPath, Boolean getWebConfigForSubDir) in c:\Inetpub\WebSiteAdminister\App_Code\WebAdminPage.cs:line 345 at System.Web.Administration.WebAdminPage.OpenWebConfiguration(String path, Boolean getWebConfigForSubDir) in c:\Inetpub\WebSiteAdminister\App_Code\WebAdminPage.cs:line 325 at System.Web.Administration.WebAdminPage.OpenWebConfiguration(String path) in c:\Inetpub\WebSiteAdminister\App_Code\WebAdminPage.cs:line 320 at System.Web.Administration.WebAdminPage.VerifyAppValid() in c:\Inetpub\WebSiteAdminister\App_Code\WebAdminPage.cs:line 446
  • How to use Web Site Administration Tool without installing VS 2005 -

    Rahul,

    I have created the Web Site Adminitrations directory and IIS configuations. I have selected

    http://10.0.0.6/UCTInternal/webstieadmin/default.aspx?applicationPhysicalPath=C:\Inetpub\wwwroot\tracker\&applicationUrl=/UCTInternal/trackit

    http://10.0.0.6/UCTInternal/trackit

    and get this message. Could you help????

    An error was encountered. Please return to the previous page and try again.

    The following message may help in diagnosing the problem: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: site at System.Web.Configuration.WebConfigurationHost.InitForConfiguration(String& locationSubPath, String& configPath, String& locationConfigPath, IInternalConfigRoot configRoot, Object[] hostInitConfigurationParams) at System.Configuration.Configuration..ctor(String locationSubPath, Type typeConfigHost, Object[] hostInitConfigurationParams) at System.Configuration.Internal.InternalConfigConfigurationFactory.System.Configuration.Internal.IInternalConfigConfigurationFactory.Create(Type typeConfigHost, Object[] hostInitConfigurationParams) at System.Web.Configuration.WebConfigurationHost.OpenConfiguration(WebLevel webLevel, ConfigurationFileMap fileMap, VirtualPath path, String site, String locationSubPath, String server, String userName, String password, IntPtr tokenHandle) at System.Web.Configuration.WebConfigurationManager.OpenWebConfigurationImpl(WebLevel webLevel, ConfigurationFileMap fileMap, String path, String site, String locationSubPath, String server, String userName, String password, IntPtr userToken) at System.Web.Configuration.WebConfigurationManager.OpenMappedWebConfiguration(WebConfigurationFileMap fileMap, String path) at System.Web.Administration.WebAdminPage.OpenWebConfiguration(String path, String appPhysPath, Boolean getWebConfigForSubDir) at System.Web.Administration.WebAdminPage.OpenWebConfiguration(String path, Boolean getWebConfigForSubDir) at System.Web.Administration.WebAdminPage.VerifyAppValid()
  • Your article is prety nice. It's a pity that i didn't see it more later.
  • It still doesn't work for http://www.website.com/WebSiteAdminister/default.aspx?......

    You get the errors described above.. but it does work if you use http://webserver/WebSiteAdminister/default....  so how can you get the web admin tool to work from out side of the network..?
  • Well, as far as I know, you can't get it working from outside of the Network, because Integrated Windows Authentication is required and it is not supported in the Internet mode.
  • hi thanks for the tip!

    I installed .NET2 in IIS 5 (Win 2000) and your tip work flawlessly!

    tq very much!
  • Hi,

    I followed the above instructions and could not get mine to work.

    Preface on my app: My ASP.Net 2.0 application's name is AAA MASP. It is already installed on IIS under the virtual directory 'AAA MASP' and it's default page is login.aspx. So, 'http://localhost/AAA MASP/login.aspx' brings up the starting page right and my app works great, no problem there.

    My asp.net membership objects have been created inside the same SQL database hosting my application data using the aspnet_regsql.exe utility.

    This is the URL that comes up on my laptop when I launch ASP.Net 2.0 configuration from my application:

    http://localhost:2104/asp.netwebadminfiles/default.aspx?applicationPhysicalPath=C:\Documents%20and%20Settings\Administrator\My%20Documents\Visual%20Studio%202005\WebSites\AAA%20MASP\&applicationUrl=/AAA%20MASP



    I performed the following steps:

    i) I created the virtual directory WebSiteAdmin on the default website
    with the directory pointing to 'C:\Windows\Microsoft .Net\Framework\v2.0.50727\ASP.NETWebAdminFiles'
    ii) I chose it to use ASP.Net 2.0 version (do I change the default page to default.aspx?)
    iii) I copied the contents of 'C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\WebSites\AAA MASP' on my laptop to 'C:\inetpub\wwwroot\WebSiteAdmin' on server
    iv) I launched http://localhost/WebSiteAdmin/default.aspx?applicationPhysicalPath=C:\Inetpub\wwwroot\WebSiteAdmin\&applicationUrl=/WebSiteAdmin on the server, it keeps giving me the message 'Resource Not Found'

    What am I doing wrong? I am a newbie to IIS management beyond a basic level, just FYI. Please advise.






  • Jurka Rahikkala and kbrunet  are having the same problem.

    Rahul's instrucitons 1-4 are bad.

    in the querystring of the URL to the websiteadmin tool, the applicationPhysicalPath parameter must be set to the path of your website on the server, and applicaitonURL parameter must be set to the relative http path of your application.

  • If anyone is still having problems with the following error:

    System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: site at System.Web.Configuration.WebConfigurationHost.InitForConfiguration

    I have something to assist you!!

    Was stuck with this for a couple of weeks unable to get the tool running on the production server, so what I know now follows.

    The page responsible for opening the web.config file of the ASP.NET web application you specify is located in your ASP.NETWebAdminFiles folder, i.e. C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ASP.NETWebAdminFiles\. Then look for App_Code\WebAdminPage.cs. This much we know from the error.

    On line 345 it is trying to open the configuration according to the application path you have specified in the querystring: return WebConfigurationManager.OpenMappedWebConfiguration(fileMap, path); However, this OpenMappedWebConfiguration method has two more optional parameters, the first of which is SITE - the one we are getting the error about. So I added a third parameter to this function: return WebConfigurationManager.OpenMappedWebConfiguration(fileMap, path, "Default Web Site"); This works as a charm!!

    I am still wondering what is being used by default as this "site" parameter as it works and most machines and I have only had this problem on the production server - have not found any documentation about this. But at least there is a workaround now if anyone's still stuck with this!!

    Best of luck with your programming.

  • Thanks everyone for chipping in!!

  • i had this problem.

    error message: an error was encountered. please return to the previous page and try again.

    cause of the problem.

    1. i had illegal characters on my website path.

    2. the directory of my website is too deep.

    solution:

    1. renamed my website path. (no illegal characters)

    2. changed my path to drive c:\mywebsite (directory not too deep).

    when i ran the web administration tool again after the changes it worked fine. I really don't know if the illegal characters or deep directories was the cause of the error. as far as i know after the changes the tool worked. i hope this will help.

    good luck

  • Thank you so much, this saved me a lot of time. Once I figured out that I had to setup the security providers from the IIS Asp.Net tab (Edit Configuration), then the whole tool actually started to work.

Page 1 of 2 (30 items) 12
Leave a Comment
  • Please add 7 and 1 and type the answer here:
  • Post