Workshop

IOTA^_^    

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.

Quiz

1:

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

2:

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

3:

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
http://www.site.com c:\www\site
http://www.site.com/sales c:\www\site\sales
http://www.site.com/hr c:\www\site\sales\hr
http://www.site.com/users d:\www\misc\users

4:

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?

http://www.site.com/hr

5:

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

http://www.site.com/sales/hr

6:

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.

7:

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

Exercises

[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.


    IOTA^_^    
    Top


    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

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net