Visual Studio .NET - ASP.net configuration

Asked By Aldo Lin Lin
11-Aug-08 01:54 AM

how to do ASP.net configuration?

Use this...  Use this...

11-Aug-08 02:04 AM

Every website can be configured using Asp.NET WebSite Configuration which is present in IDE of Visual Studio.

It is present in WebSite menu of IDE of Visual Studio.

Here u can set Roles, User login, Configuration of website, Data Provider etc.

Issue...  Issue...

11-Aug-08 02:05 AM

Every website can be configured using Asp.NET WebSite Configuration which is present in IDE of Visual Studio.

It is present in WebSite menu of IDE of Visual Studio.

Here u can set Roles, User login, Configuration of website, Data Provider etc.

ASP.net configuration  ASP.net configuration

11-Aug-08 02:07 AM

ASP.NET configuration files are stored in the same directory as the site content. At deployment time, you only need to copy the content directory to obtain both the content and the application configuration.
You can use standard text editors to modify configuration files. This makes it easy to change configuration settings both locally and remotely.
The configuration files are extensible; as a result, you can add your own custom configuration settings.
The system automatically detects changes to ASP.NET configuration files. You do not have to restart IIS or reboot the Web server for the settings to take effect.

http://support.microsoft.com/kb/307626

Check this  Check this
11-Aug-08 02:13 AM
Hi

ASP.NET Configuration system is used to describe the properties and behaviors of various aspects of ASP.NET applications. Unlike Classic ASP where configuration information was stored in a binary repository called the IIS metabase, ASP.NET uses XML-based configuration system that is more accessible and easier to use. You can configure features, such as Connection Strings, Authentication Modes, Caching, Debug and Tracing, Custom Errors and many more.

Benefits of XML-based Configuration files

  • ASP.NET Configuration system is extensible and application specific information can be stored and retrieved easily. It is human readable.

  • You need not restart the web server when the settings are changed in configuration file. ASP.NET automatically detects the changes and applies them to the running ASP.NET application.

  • You can edit Configuration file using simple text editor. It can be easily exchanged between servers in a typical web farm scenario.

Configuration Files

ASP.NET configuration data is stored in two primary XML-based files. These files allow you to easily edit configuration data at any moment even after the application is deployed on server.

Different types of Configuration files

Machine.config: Server or machine-wide configuration file

Web.config: Application configuration files which deal with a single application

Server Configuration file (Machine.config)

Every ASP.NET server installation includes a configuration file named machine.config, and this file is installed as a part of .NET Framework installation. You can find machine.config in C:\<Windows>\Microsoft.NET\Framework\\Config\

ASP.NET 2.0 provides another two files machine.config.default and machine.config.comments. The machine.config.default acts as a backup for the machine.config file. The machine.config.comments file contains a description for each configuration section and explicit settings for the most commonly used values.

Application Configuration file (Web.config)

Each and Every ASP.NET application has its own copy of configuration settings stored in a file called Web.config. If the web application spans multiple folders, each sub folder has its own Web.config file that inherits or overrides the parent's file settings.

Configuration File Format

Both Machine.config and Web.config share the same XML schema. Configuration files are divided into multiple sections, with each section being a top-level XML element. The root level element in a configuration file is always <configuration>. Configuration file is organized as hierarchy of section handlers, with each section provides a unique functionality.

For ex: <SessionState> section handler handles session state for the application.

Connection Strings



In ASP.NET 1.0/1.1, all connection string information was stored in the <appSettings> section. However, ASP.NET 2.0 introduces a new section called <connectionStrings> that stores all kinds of connection-string information.

<configuration>
    <connectionStrings>
      <add name ="CookieDemo"
           connectionString ="server=aras02;database=aras02_Db;
           uid=freelance91;pwd=freelance91"/>
    </connectionStrings>
 </configuration/>

Session State

You can configure session information using the <sessionState> element. ASP.NET 2.0 introduces new Session state mode called custom mode which allows developer to persist state in any permanent store like XML or databases like Oracle, DB2 using a custom written provider class.

<sessionState
         mode ="StateServer"
         cookieless ="false"
         timeout ="20"
         stateConnectionString="tcpip=aras02:42424"
         stateNetworkTimeout="60"
         sqlConnectionString =""
         />

Compilation Model Configuration

ASP.NET Compilation Settings can be configured using the <compilation> element. You can configure various options like debug assemblies, default language to use in dynamic compilation model and other compiler options like compiling custom resource files.

Custom Errors

When the ASP.NET application fails, the ASP.NET page can show the default error page with the source code and line number. We can prevent this kind of error messages by configuring <customErrors> element which allows for defining custom error messages in an ASP.NET application.

  <customErrors mode="[on/off/RemoteOnly]" defaultRedirect="[URL]">
    <error statusCode="[statusCode]" redirect="[URL]" />
  </customErrors>

Authentication

You can configure security model for your application using <authentication> element. ASP.NET supports three forms of authentication. They are:

  • Windows authentication

  • Passport authentication

  • Forms Authentication

You can disable authentication by setting mode attribute = "none"

Custom Application Specific settings

Every web application must store some application-specific information for its runtime use. The "appSettings" section provides a way to define custom application settings for an ASP.NET application.

  <appSettings>
    <add key="[key]" value ="[Value]"/>
  </appSettings >

Different ways of specifying ASP.NET Configuration

ASP.NET provides hierarchical model for specifying configuration data. Each lower level in hierarchy can override the settings defined in upper level in the hierarchy. It also inherits the settings from parent level in hierarchy.

Machine.config->Web.config (root folder) ->Web.config (sub directory)

  • Specify at the machine level(machine.config) which apply for all applications hosted on machine

  • Specify at the application level(web.config) which apply for single application(root directory level)

  • Specify at the sub directory level(web.config) which apply for application sub directory

In ASP.NET 1.0/1.1, Frame work provided API's that enabled you only to read information from the configuration file. You had no way to write information into the configuration file. You have to manually change settings in configuration files which is error prone due to XML tags, case-sensitivity

However ASP.NET 2.0 is shipped with API's which are capable to manipulate the configuration information settings in local machine or remote machine.

Different ways to create and Edit the Configuration files:

  • ASP.NET MMC Snap-in

  • Web site Administration tool

  • ASP.NET Configuration API (Programmatic configuration)

  • Text Editors (Visual Studio IDE)

Configuration files are based on XML, the elements that describe the configuration are case-sensitive.

Check these links:

http://www.developer.com/net/asp/article.php/3569166

http://www.beansoftware.com/ASP.NET-Tutorials/Configuration-System.aspx


Hope this helps

SAN


See this info  See this info
11-Aug-08 02:14 AM

The ASP.NET configuration system features an extensible infrastructure that enables you to define configuration settings at the time your ASP.NET applications are first deployed so that you can add or revise configuration settings at any time with minimal impact on operational Web applications and servers.

The ASP.NET configuration system provides the following benefits:

  • Configuration information is stored in XML-based text files. You can use any standard text editor or XML parser to create and edit ASP.NET configuration files.
  • Multiple configuration files, all named Web.config, can appear in multiple directories on an ASP.NET Web application server. Each Web.config file applies configuration settings to its own directory and all child directories below it. Configuration files in child directories can supply configuration information in addition to that inherited from parent directories, and the child directory configuration settings can override or modify settings defined in parent directories. The root configuration file named systemroot\Microsoft.NET\Framework\versionNumber\CONFIG\Machine.config provides ASP.NET configuration settings for the entire Web server.
  • At run time, ASP.NET uses the configuration information provided by the Web.config files in a hierarchical virtual directory structure to compute a collection of configuration settings for each unique URL resource. The resulting configuration settings are then cached for all subsequent requests to a resource. Note that inheritance is defined by the incoming request path (the URL), not the file system paths to the resources on disk (the physical paths).
  • ASP.NET detects changes to configuration files and automatically applies new configuration settings to Web resources affected by the changes. The server does not have to be rebooted for the changes to take effect. Hierarchical configuration settings are automatically recalculated and recached whenever a configuration file in the hierarchy is changed. The http://msdn.microsoft.com/en-us/library/7w2sway1(VS.71).aspx section is an exception.
  • The ASP.NET configuration system is extensible. You can define new configuration parameters and write configuration section handlers to process them.
  • ASP.NET help protect configuration files from outside access by configuring Internet Information Services (IIS) to prevent direct browser access to configuration files. HTTP access error 403 (forbidden) is returned to any browser attempting to request a configuration file directly.

See these links which will explain you how to configure asp.net app;

http://msdn.microsoft.com/en-us/library/kza1yk3a(VS.71).aspx

http://www.developer.com/net/asp/article.php/3569166

http://www.beansoftware.com/ASP.NET-Tutorials/Configuration-System.aspx

Best Luck!!!!!!!!!!!!!!!
Sujit.

Asp.NET Configuration  Asp.NET Configuration
11-Aug-08 02:35 AM
See the following articles about ASP.NET Configuration

http://msdn.microsoft.com/en-us/library/b5ysx397.aspx

http://msdn.microsoft.com/en-us/library/aa719558.aspx

Hope it helps.
very simple , every thing put in config file  very simple , every thing put in config file
11-Aug-08 02:49 AM
The .NET Framework gives developers and administrators control and flexibility over the way applications run. An administrator can control which protected resources an application can access, which versions of assemblies an application will use, and where remote applications and objects are located. Developers can put settings in configuration files, eliminating the need to recompile an application every time a setting changes. This section describes what can be configured and why configuring an application might be useful.
go  this link  go this link
11-Aug-08 05:38 AM
http://msdn.microsoft.com/en-us/library/aa719558.aspx
Create New Account
help
Visual Studio.Net Professional not running after installation .NET Framework Could not get the Visual Studio.Net Professional not running smoothly. and the server 2003 was asking me for connection. above all, i could not integrate both the server and the Visual Studio.Net Professional to running after installation. ASP.NET Security Discussions Visual Studio (1) Try
visual studio.net 2003 and Access 2007 database .NET Framework Hi I am currently using Visual Studio.Net 2003 running on Windows Server 2000 operating system. I have used Visual Studio.net 2003 connecting to Access 2002 databases in the pass with great success. Now
Wise for Visual Studio.NET Wise for Visual Studio.NET By Peter A. Bromberg, Ph.D. To "Print This Page" Link Peter Bromberg Wise for Visual Studio .NET is a total and complete installation development system for creating and editing Windows® Installer
Visual Studio.NET: Help Yourself! Visual Studio.NET: Help Yourself! By Peter A. Bromberg, Ph.D. Peter Bromberg I'm constantly annoyed by the number of developers using Visual Studio.NET who don't seem to see the need to create decent documentation for their
Migrating to Visual Studio.NET 2003: A Developer Perspective Migrating to Visual Studio.Net 2003: A Developer - oriented analysis By Peter A. Bromberg, Ph.D. Printer - Friendly Version Peter Bromberg A new Platform On April 24, 2003 Microsoft Windows Server 2003 and Visual Studio .NET 2003 are officially released. Many developers and beta testers (myself included) have been feverishly