Friday, September 22, 2006
« How is "Publish Web Site" Even... | Main | DAMN - Developers Advocating More Naps :... »

I recently created a small WebSite project in Visual Studio 2005, in part, to simply reaquire a feel for it.  In generally, my programming style and thinking falls more in line with the Web Application Projects which are akin to creating web projects in Visual Studio 2003.  The scope of this project is very small so I figured that it would be good to experiment with the WebSite project on a small scale...it seems to fit nicely.

That said, however, I have an ASPNETDB.mdf database that maintains membership for the website with a few canned users.  One thing that I do like in VS2005 is the "ASP.NET Configuration" option which launches a Cassini website for the administration of users, roles, permissions, etc that are maintained in the ASPNETDB.mdf database.

Once the database is moved over to the server, however, you lose the ability to run this management website...or so it may seem at first.

In fact, you have all of the management tools as part of the .NET 2.0 installation, but you have to wire it up.  So, if you want the nice ASP.NET Web Site Administration Tool on your server simply follow these steps:

  1. Create a new virtual directory that references %WINDIR%\Microsoft.NET\Framework\v2.0.50727\ASP.NETWebAdminFiles.  I called it ASP.NETWebAdminFiles.
  2. Make sure that the appopriate version of ASP.NET is used.  In this case, it should be .NET 2.0.
  3. On the directory security tab, disable anonymous access.
  4. Set the default document to default.aspx.

Then, to properly manage your website, you need to specify a couple of query string parameters: applicationPhysicalPath and applicationUrl.

For instance:

http://localhost/ASP.NETWebAdminFiles/default.aspx?applicationPhysicalPath=C:\TestWebsite\&applicationUrl=/

For each website, I set up a simple shortcut that provides quick access to the administration console.