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