ASP.NET
  Home arrow ASP.NET arrow Page 5 - ASP.Net Application
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Moblin 
JMSL Numerical Library 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP.NET

ASP.Net Application
By: O'Reilly Media
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 33
    2004-12-15

    Table of Contents:
  • ASP.Net Application
  • ASP.NET Mobile Web Applications
  • Application Structure and Boundaries
  • Application Boundaries
  • Application File Types
  • global.asax Files
  • .aspx Files
  • Code-Behind and Class Files

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    ASP.Net Application - Application File Types


    (Page 5 of 8 )

    A number of different file types are associated with an ASP.NET application, and it’s important to understand the purpose of each type, even if you aren’t using all of them in your current applications. In this section, we’ll look at the major file types associated with ASP.NET Web Applications and web services and what each of them does.

    web.config Files

    web.config is the file type used for configuration of various settings within an ASP.NET application. Applications may contain more than one web.config file (though there may be only one per directory or subdirectory), and the web.config files are applied in an hierarchical fashion. What this means is that if you have defined a particular setting (such as the user accounts permitted to access that directory) in the web.config file at the root of your application, this setting applies to the application and all of its subdirectories, if it has any. You can override that setting for a particular subdirectory by using a web.config file in a subdirectory of the application. The web.config files use an XML-based syntax, and both the tag names and their attributes are case-sensitive.

    web.config provides configuration settings for:

    • Application-specific settings, such as connection string information (since the web.config file resides within the web application’s file space, it is probably best to avoid storing sensitive information such as passwords in plain text in a configuration file, or at all, if that’s feasible).

    • Authentication and authorization.

    • Browser capabilities (mapping specific functionality to the information retrieved from a User Agent string).

    • Compilation settings, including whether an application should be run in debug or release mode.

    • Custom error handling information.

    • Globalization settings.

    • HttpHandlers and HttpModules associated with the application.

    • HttpRuntime settings.

    • Application Identity and encryption/decryption key settings.

    • ASP.NET Page defaults (for the @ Page directive).

    • ASP.NET Process settings, including settings for Web Gardens, and proactive restart of applications based on memory used or number of requests received.

    • Code-access security settings, including mappings of trust levels to security policy files, and trust setting for an application.

    • Session state settings, including whether to run Session state in process, out of process, or in SQL Server.

    • Application Trace settings. Tracing is a useful new feature for debugging and troubleshooting that we’ll discuss in Chapter 10.

    • Web service settings.

    Note that web.config is an optional file. Any configuration settings not set in a web.config file within the application will be inherited from the server-level configuration file, machine.config. A sample web.config file is shown in Example 2-3.

    Example 2-3 . Sample web.config file

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>

      <system.web>

        <compilation
          defaultLanguage="c#"
          debug="true"/>

        <trace
          enabled="true"
          requestLimit="10"
          pageOutput="false"
          traceMode="SortByTime" 
          localOnly="true" />

        <sessionSTATE
          mode="InProc"
          stateConnectionString="tcpip=127.0.0.1:42424"
          sqlConnectionString="data source=127.0.0.1;
                               user id=sa;password="
          cookieless="false"
          timeout="20" />

      </system.web>

    </configuration>

    We’ll discuss how to make changes to web.config, and the syntax of the various configuration sections, in Chapter 8. 

    This chapter is from ASP.NET in a Nutshell,  by G. Andrew Duthie. (O'Reilly, 2003, ISBN:  0596005202). Check it out at your favorite bookstore today. Buy this book now.

    ASP.NET ARTICLES

    - Source Code for Saving and Retrieving Data w...
    - Using GridView to Save and Retrieve Data wit...
    - Handling Dynamic Images in ASP.NET 3.5 AJAX ...
    - Retrieving Data with AJAX and the GridView C...
    - Playing with Images in ASP.NET 3.5 AJAX Appl...
    - Saving and Retrieving Data with AJAX
    - Enhancing PHP Via the ASP.NET AJAX Framework...
    - Enhancing PHP Programming with the ASP.NET A...
    - Classes and ASP.NET AJAX
    - Using ASP.NET AJAX
    - Building a Simple Storefront with LINQ
    - Developing a Dice Game Using ASP.NET Futures...
    - Completing an ASP.NET AJAX Server-Centric Ba...
    - Information Management for an ASP.NET AJAX S...
    - Comment and Order Management for an ASP.NET ...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
    Stay green...Green IT