1. Trang chủ
  2. » Công Nghệ Thông Tin

Exchange SQL And IIS- P176 pot

5 197 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 5
Dung lượng 314,01 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Confi guring Custom Error Messages Using IIS ManagerLet’s fi rst take a look at viewing and updating the Custom Errors pages using IIS Manager.. After opening and connecting to an IIS 7

Trang 1

Confi guring Custom Error Messages Using IIS Manager

Let’s fi rst take a look at viewing and updating the Custom Errors pages using IIS Manager

After opening and connecting to an IIS 7 server, click the Error Pages icon in the IIS section and then click Open Feature from the Actions pane (or simply double-click the Error Pages icon),

as shown in Figure 17.3 These are the default Error Pages defi ned for the entire Web server Any changes done at this level will impact the error pages settings for all the sites supported on that IIS 7 server, except where a site or application overrides those values

There are a number of options available at this point from a Status Code perspective You can add

a Status Code by clicking Add .in the Actions pane (see Figure 17.4).

The Add Custom Error Page dialog box will allow you to provide a Status Code (e.g., 404) or a Substatus Code (e.g., 404.14) The Path Type fi eld allows you to defi ne the kind of action to take based

on the value in the path (see Figure 17.4) Table 17.1 provides details on the available path types

Figure 17.2 IIS 7.0 Detailed HTTP Error Message

Trang 2

Figure 17.3 The IIS Manager

Figure 17.4 The Add Custom Error Page

Trang 3

Controlling the custom errors can be done at a variety of locations within IIS 7, and thus it’s important to understand where these settings are actually being stored For the entire Web server, those changes are done in the applicationHost.confi g fi le, which is located in the \Windows

\System32\Inetsrv\Confi g folder Additionally, when you’re managing a given Web site, those changes can also be stored in the applicationHost.confi g fi le, or they can be managed within the web.confi g for the site

HTTP error responses can be defi ned for the following IIS levels:

■ Web server

■ Web site

■ Web application

■ Physical directory

■ Virtual directory

■ File (URL)

These settings were previously available in IIS 6.0 but were not widely known and utilized In IIS 6.0, this was done by setting a number of properties (HTTPErrorCode, HTTPErrorSubcode, URL, HandlerURL, FILE, or Filename) and using the proper combination, depending on the type of redirection you where going to use With IIS 7.0, this is much easier to implement in the User Interface and via XML confi guration

<httpErrors> Confi guration

With the rich integration between ASP.NET and IIS 7.0, a developer or administrator can defi ne the httpError confi guration at the server, Web site, or virtual directory level This provides a greater

amount of control versus what was previously available in IIS The default <httpErrors> section is

defi ned in the applicationHost.confi g fi le (More information on the location and use of the

applicationHost.confi g fi le can be found in Chapter 15)

Table 17.1 Available Path Types

Redirect Redirects the client browser to a different URL http://<URL>

Trang 4

<error statusCode=“401” prefi xLanguageFilePath=“%SystemDrive%\inetpub\custerr”

path=“401.htm” />

<error statusCode=“403” prefi xLanguageFilePath=“%SystemDrive%\inetpub\custerr”

path=“403.htm” />

<error statusCode=“404” prefi xLanguageFilePath=“%SystemDrive%\inetpub\custerr”

path=“404.htm” />

<error statusCode=“405” prefi xLanguageFilePath=“%SystemDrive%\inetpub\custerr”

path=“405.htm” />

<error statusCode=“406” prefi xLanguageFilePath=“%SystemDrive%\inetpub\custerr”

path=“406.htm” />

<error statusCode=“412” prefi xLanguageFilePath=“%SystemDrive%\inetpub\custerr”

path=“412.htm” />

<error statusCode=“500” prefi xLanguageFilePath=“%SystemDrive%\inetpub\custerr”

path=“500.htm” />

<error statusCode=“501” prefi xLanguageFilePath=“%SystemDrive%\inetpub\custerr”

path=“501.htm” />

<error statusCode=“502” prefi xLanguageFilePath=“%SystemDrive%\inetpub\custerr”

path=“502.htm” />

</httpErrors>

The default location for the custom error pages is %SystemDrive%\inetpub\custerr Within that

folder will be additional folders that map to a localized code For U.S English, that subfolder is

labeled “en-US.” The localized version that will be used for the response will be defi ned by the actual

browser setting that is set by the end user

Table 17.2 Child <error> Node Attributes and Values

defaultPath Default path to the HTTP error fi le or URL that will be

used within the child <error> node.

detailedMoreInformationLink At the bottom of a Detailed error page, a “More

Information” link redirects the user to a Microsoft Support article Setting the

DetailedMoreInformationLink property can override the base URL for this link This can be extremely useful if you want to capture these errors, even for internal testing, to store in a database or provide a response using an internal Knowledge Base article that directly references a particular product or

?LinkID=62293”)

defaultResponseMode Used to defi ne the default Response Mode that will

be used within the child <error> node (Default=File):

File Static fi le will be used.

Continued

Trang 5

Table 17.2 Continued

ExecuteURL Points to a URL within the same server

For this to work, it must be a URL that points to a dynamic page (e.g., ASPX page) that resides within the same application pool that generated the error Needless to say, you might not want to set this at the server level if you host a number of sites with more than one application pool By default, you will receive

an error if you attempt to do this to a location outside the appPool However, you can actually get around this and allow it to happen with an

appropriate registry key Read the “Some Independent Advice” sidebar for more details

Redirect Redirects to a specifi c URL The URL can be

on the same server or a completely different server

errorMode Defi nes whether a Custom Error page or Detailed

Error page is used upon a given error being

DetailedLocalOnly A detailed error will only be

displayed when the request comes from the local machine

Custom Custom pages will be used upon an error Detailed A detailed error response will be provided

regardless of a custom page being assigned

or outside the local machine

existingResponse ASP.NET and IIS 7 are not integrated when it comes to

error responses Thus this value allows you to control the way you want to handle error responses

(Default=Auto):

Auto IIS 7.0 will go through a series of checks to

decide which error response will be used:

with the fTrySkipCustomErrors fl ag, the existing response is passed through, and no detailed or custom error is shown

response is replaced

existing response, the response is passed through

existing response, the response is replaced with a detailed error message

Ngày đăng: 06/07/2014, 13:20

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN