Create a web configuration file

Using the features of the ASP.NET configuration system, you can configure an entire server, an ASP.NET application, or individual pages in application subdirectories. You can configure features such as authentication modes, page caching, compiler options, custom errors, debug and trace options, and much more.

The ASP.NET configuration system features an extensible infrastructure that enables you to define configuration settings in an XML file named web.config. Configuration settings for your entire site are managed in a web.config file that is located in the site's root folder.

Some ASP.NET controls, such as all the controls in the AJAX category, and also the DataPager and ListView controls, require specific settings in a web.config file in order to function correctly. If you try to work with one of these controls, and your site doesn't contain the required web.config file, errors appear in the Design view of the page where the control would have appeared. In Design view, if you click a control in a site that doesn't contain the required web.config file, Microsoft Expression Web will give you the option to either create a new web.config file or update your existing web.config file. For more information, see Administering ASP.NET Web Sites Cc295398.xtlink_newWindow(en-us,Expression.40).png in the MSDN library online.

To create a web configuration file

  1. On the File menu, click New.

  2. In the New dialog box, on the Page tab, in the left column, select ASP.NET, and then, in the right column, select one of the following:

    • Web Configuration 2.0 to configure .NET 2.0 web application settings.

    • Web Configuration 3.5 to configure .NET 3.5 web application settings.

    Note

    The version you select should match the version of the .NET framework that is installed on your computer and on your web server.

  3. Click OK.

See also

Concepts

ASP.NET Ajax controls
DataPager
ListView
Choosing and installing a .NET framework

Send feedback about this topic to Microsoft. © 2011 Microsoft Corporation. All rights reserved.