How to: Specify Web.config Settings

Web.config configuration file settings are modeled in the Settings and Constraints Editor for Web applications and Web services. The default values specified for Web.config are obtained from the models for Web applications. Additional settings are gathered from the Machine.config configuration file on the development machine where Distributed System Designers are installed.

In the Settings and Constraints Editor, Web.config settings are located under Application Settings, WebApplication, and then Configuration.

To view Web.config settings

  1. Right-click an ASP.NET Web application or ASP.NET Web service on the application diagram and choose Settings and Constraints.

  2. In the Settings and Constraints Editor, navigate to the Configuration node listed under Application Settings and then Web Application.

    Initially, only a few of the Web.config sections and settings are displayed under the Configuration node. To add additional sections, you need to add the corresponding resources.

  3. To add additional Web.config resources, right-click the Configuration node and choose Add Resource. Select a resource from the displayed list, which includes the following:

    • AppSettingsSection

    • ConnectionStringSection

    • NetSectionGroup

    • ProtectedConfigurationSection

    • SerializationSectionGroup

    • SystemWebSectionGroup

    • TransactionsSectionGroup

    Note

    Some Web.config resources do not contain any settings until you add the needed child resource. For example, the NetSectionGroup resource has no settings of its own, but you can add the AuthenticationModulesSection, ConnectionManagementSection, DefaultProxySection, RequestCachingSection, SettingsSection, and WebRequestModulesSection resources, which do contain settings.

  4. View the settings associated with each resource in the right pane of the Settings and Constraints Editor.

To modify a Web.config setting

  1. Add the resource that contains the setting you want to modify.

  2. In the right pane of the Settings and Constraints Editor, edit the setting. For more information, see Applying Settings.

    Note

    You can also edit the settings directly in the Web.config file. The Web.config file and the Settings and Constraints Editor are always kept synchronized with each other.

The Web.config file does not appear in Solution Explorer until it is generated as follows.

To generate a Web.config file in Solution Explorer

  1. Implement the Web application for which you want to display the Web.config file. For more information, see How to: Implement Applications on Application Diagrams.

  2. In the Settings and Constraints Editor, modify a Configuration section setting for the application or add a new resource to the configuration section.

Security

Distributed System Designers does not store certain settings in .sdm files. However, settings such as connection strings appear in the .config file after you implement the application.

The following settings appear in the Web.config file as plain text (unencrypted) for all implemented Web applications:

  • ConnectionStrings - Contained in the ConnectionStringsSection resource.

  • Network - Contained in the SmtpSection resource.

  • Password - Contained in the IdentitySection and ProcessModelSection resources.

  • Users - Contained in the FormsAuthenticationCredentials resource.

For more information, see Considerations for Implementing Applications.

See Also

Tasks

How to: Add Resources

Reference

Web Application Resources

Other Resources

Common Application, System and Logical Server Configuration Tasks