Sams Teach Yourself ASP.NET in 21 Days, Second Edition
By Chris Payne
Table of Contents
Day 18.  Configuring and Deploying ASP.NET Applications

This workshop will help reinforce the concepts I've covered in today's lesson. It is very helpful to understand fully the answers before moving on. Answers can be found in Appendix A.



True or False: You can access the <appSettings> section with the ConfigurationSection.AppSettings property.


Is it possible to view the global.asax file from your browser?


What interface must a custom handler implement?

The following questions deal with the directory structure shown in Table 18.4.

Table 18.4. A Web Server Directory Structure Exercise
Application URL Physical Path c:\www\site c:\www\site\sales c:\www\site\sales\hr d:\www\misc\users


The sales virtual directory has a web.config with the following setting:

 <httphandlers>    <add verb="PUT, POST" path="index.aspx" type="System.Web.       UI.PageHandlerFactory" /> </httphandlers> 

If the hr directory is accessed as follows, will it inherit this setting?


If the hr directory is accessed as follows, will it inherit this setting?


Suppose that the web.config in sales also has the following setting:

 <location path="hr/*.aspx">    <authorization>          <deny users="?" />    </authorization> </location> 

Is this an adequate security measure against entry into hr? Explain.


Describe a better use of web.config to address the preceding question.


[click here]

Set up a web.config file for a sample application that does the following:

  • Turns on debug mode for the application.

  • Sets custom errors to display an errors.aspx page.

  • Declares a section called authors with a PrimaryAuthor key with the value of your name. This section should use the DictionarySectionHandler handler.


    Sams Teach Yourself ASP. NET in 21 Days
    Sams Teach Yourself ASP.NET in 21 Days (2nd Edition)
    ISBN: 0672324458
    EAN: 2147483647
    Year: 2003
    Pages: 307
    Authors: Chris Payne © 2008-2017.
    If you may any questions please contact us: