Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
ASP .NET 2.0 Beta Preview - B. Evjen.pdf
Скачиваний:
26
Добавлен:
24.05.2014
Размер:
15.33 Mб
Скачать

Administration and Management

Figure 14-11

Again, this dialog provides you with a wealth of available options for modifying how the pages are run in a specific application as well as how your applications, in general, are built and run. The following list briefly describes some of these options:

Common Compilation, Page, and Runtime Settings: This section includes a number of items that are very page-specific. From the first drop-down list, you can select the default language of your application. The available options include all the Microsoft .NET-compliant languages — C#, VB, JS, VJ#, and CPP. Other settings enable you to set the default theme or master page that your ASP.NET pages use during construction.

Globalization Settings: This section allows you to set the default encodings and the cultures for your application.

Identity Settings: The Identity Settings enable you to run the ASP.NET worker-process under a specific user account.

State Management

ASP.NET applications, being stateless in nature, are highly dependent on how state is stored. The sixth tab, the State Management tab (see Figure 14-12), enables you to change a number of different settings that determine how state management is administered.

395

Chapter 14

Figure 14-12

Because you can apply state management to your applications in a number of ways, this dialog allows for a number of different settings — some of which are enabled or disabled based on what is selected. The following list describes some of the available items in this dialog:

Session state mode: This section enables you to determine how the sessions are stored by the ASP.NET application. The default option (shown in Figure 14-12) is InProc. Other options include Off, StateServer, and SQLServer. Running sessions in-process (InProc) means that the sessions are stored in the same process as the ASP.NET worker process. Therefore, if IIS is shut down and then brought up again, all the sessions are destroyed and unavailable to end users. StateServer means that sessions are stored out-of-process by a Windows service called ASPState. SQLServer is by far the most secure way to deal with your sessions@@it stores them directly in SQL Server itself. Although it is the most secure method, it is also the least performance-efficient method.

Cookieless mode: The Cookieless mode section enables you to change how the identifiers for the end user are stored. The default setting uses cookies (UseCookies). Other possible settings include UseUri, AutoDetect, and UseDeviceProfile.

Session timeout: Sessions are only stored for a short period of time before they expire. For years, the default has been 20 minutes. Changing the value here changes how long the sessions created by your application are valid.

396

Administration and Management

Advanced

The last tab, the Advanced tab, is basically a catch-all for all other possible settings in the web.config file. The uppermost drop-down list in the dialog allows you to change the entire page of options. The available sections include

Pages & Tracing

Compilation

Http Handlers

Http Runtime

Locations

Http Modules

Trust

I don’t have room to discuss all of these sections in depth, but I cover some of the more interesting ones in the following paragraphs. Figure 14-13 shows the first option, Pages & Tracing, selected.

Figure 14-13

397

Chapter 14

The Pages & Tracing page lets you determine how the pages are run and traced. You can decide whether smart navigation, view state, response buffering, or request validation is enabled. With tracing, you can set how tracing functions, including whether tracing is used for local requests only, and also how the tracing information is sorted.

The Compilation section of the Advanced tab enables you to define how your ASP.NET pages are compiled. For example, you can define whether Visual Basic’s Option Strict is always enabled or not enabled during the compilation process. You can also specify the local assemblies that are compiled with the application.

The Http Handlers section of the Advanced tab, shown in Figure 14-14, enables you to make modifications to the handlers available for your application. By default, a number of handlers — such as handlers for tracing and the ASP.NET Web Site Administration Tool — are already in place. In this section of the dialog, you can add, edit, or remove handlers.

Figure 14-14

Another Advanced tab option, Http Runtime, is shown in Figure 14-15. This section enables you to set the maximum request length that your application can deal with. By default, this is set at around 4MB, but for security purposes it is always better to lower this number to something that are you still comfortable with. Other options in this dialog enable you to set the minimum number of free threads for new requests, the minimum number of free threads for new local requests, and the application request queue limit.

398