figure 6. MMC display of ASP.NET applications
the MMC IIS tab lets you to choose which version of ASP.NET your application uses and displays the Web.config location.
in addition to managing the framework version, the console has an "Edit configuration" button that lets you visually edit most of the Web.config settings without having to directly manipulate the Web.config XML file. As an administrator, you will find that this MMC snap-in provides an incredibly useful tool for configuring and managing multiple ASP.NET applications on a single server.
you can also retrieve and edit configuration information using the system.configuration.configuration class. These API''s let you programmatically access XML configuration files. This lets you to develop custom administration tools. The following code displays the type of authentication enabled for an application on your local machine:
// C#
Configuration cfg = Configuration.GetConfigurationForUrl("/Application_name"); Response.Write( cfg.Web.Authentication.Mode.ToString() );
microsoft Visual Basic .NET
Dim cfg As Configuration = Configuration.GetConfigurationForUrl("/Application_name") Response.Write( cfg.Web.Authentication.Mode.ToString() )
the following code enables Forms-based authentication for a local Web application:
// C#
Configuration cfg = Configuration.GetConfigurationForUrl("/MyApp"); cfg.Web.Authentication.Mode = HttpAuthenticationMode.Forms; cfg.Update();
visual Basic .NET
Dim cfg As Configuration = & _ Configuration.GetConfigurationForUrl("/MyApp") cfg.Web.Authentication.Mode = HttpAuthenticationMode.Forms cfg.Update()
all four of these features (IntelliSense , administrative Web site, MMC snap-in and configuration API''s) help reduce the amount of time and effort you will have to spend configuring your ASP.NET applications.
asp.net 2.0 and Visual Studio 2005 also change many of the day-to-day aspects of Web application development. In this section, we will look at several of the areas where features available in ASP.NET 1.x have been heavily modified.
in ASP.NET 1.x and older versions of Visual Studio .NET, you had to connect to an IIS instance through Microsoft Front Page Server Extensions. As a developer, you also had to have administrative access to an IIS instance in order to create new Web sites. Many companies were leery of the administrative burden of creating, monitoring, updating, and maintaining extra Web servers running inside the corporate network. In ASP.NET 2.0, connecting to the server has changed.
first, for development, Visual Studio 2005 now comes with a built-in development-only Web server. This lightweight Web server can only respond to local requests and is therefore not a security threat. The server does, however, support full debugging f