DOCUMENT:Q308175 10-MAY-2002 [iis] TITLE :DOC: Broken Links in ASP Help Files PRODUCT :Internet Information Server PROD/VER:: OPER/SYS: KEYWORDS:kbdocerr ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - Microsoft Internet Information Services version 5.1 ------------------------------------------------------------------------------- SUMMARY ======= When you click the following links on the following IIS Help pages, the expected page does not appear in the browser: Page Link ----------------------------------------------------------- Installable Components for ASP Logging Utility Component Response Object CodePage Response Object LCID ASP Tutorial IIS snap-in MORE INFORMATION ================ The following four files are missing from the Winnt/Help/Iishelp/Iis/Htm/Asp directory: - Comp6i5w.htm - Vbob150l.htm - Vbob055w.htm - Iisbuti.htm To resolve this problem, paste the data for each of the missing files in Notepad, and then name the files as specified. Page 1: Installable Components for ASP: - Page: Installable Components for ASP - Link: Logging Utility Component - Directory and file name: Winnt/Help/Iishelp/Iis/Htm/Asp/Comp6i5w.htm Paste the following code in Notepad, name the file Comp6i5w.htm, and then save the file in the Winnt/Help/Iishelp/Iis/Htm/Asp directory: Logging Utility Component
 
Platform SDK: Internet Information Services 5.1

Logging Utility Component

The IIS Log component is used to create an IISLog object, which enables your applications to read from the IIS log. This component allows you to quickly create, for example, ASP scripts or VB components that programmatically walk through daily log files so that certain types of information can be extracted.

Important

The user accessing the ASP script that instantiates the IISLog component must be authenticated as an Administrator or Operator on the server on which IIS is running. If the user is only Anonymous, the IIS Log component will not function properly.

File Names

Logscrpt.dll The Logging Utility component

Syntax

Set oIISLog = Server.CreateObject( MSWC.IISLog ) 
    

Parameters

oIISLog
Specifies the name that can be used as a reference to the IISLog component.

Methods

AtEndOfLog Indicates whether all records have been read from the log file.
CloseLogFiles Closes all open log files.
OpenLogFile Opens a log file for reading or writing.
ReadFilter Filters records from the log file by date and time.
ReadLogRecord Reads the next available log record from the current log file.
WriteLogRecord Writes a log record to the current log file.

Properties

BytesReceived Indicates the bytes received.
BytesSent Indicates the bytes sent.
ClientIP Indicates the client's host name.
Cookie Indicates the client's cookie.
CustomFields Indicates an array of custom headers
DateTime Indicates the date and time in GMT.
Method Indicates the operation type.
ProtocolStatus Indicates the protocol status.
ProtocolVersion Indicates the version string.
Referer Indicates the referrer page.
ServerIP Indicates the server's IP address.
ServerName Indicates the server name.
ServerPort Indicates the port number.
ServiceName Indicates the service name.
TimeTaken Indicates the total processing time.
URIQuery Indicates any parameters passed with the request.
URIStem Indicates the target URL.
UserAgent Indicates the user agent string.
UserName Indicates the user's name.
Win32Status Indicates the Win32 status code.

Note

The following steps are necessary to use the IIS Log component effectively:

Important

Only log files created by logging modules that support log file reading will be accessible through this component. The four built-in logging modules that come with IIS support log-file reading, but if you are using a custom or third-party logging module, you will need to enhance the logging module. See Extending IIS Logging Capabilities for more information.

Platform SDK Release: January 2002
  Contact Platform SDK   Order a Platform SDK CD Online

 

Page 2: Response Object: - Page: Response Object - Link: CodePage - Directory and file name: Winnt/Help/Iishelp/Iis/Htm/Asp/Vbob150l.htm Paste the following code in Notepad, name the file Vbob150l.htm, and then save the file in the Winnt/Help/Iishelp/Iis/Htm/Asp directory: CodePage
 
Platform SDK: Internet Information Services 5.1

CodePage

The CodePage property specifies how strings are encoded in the intrinsic objects. A codepage is a character set that can include numbers, punctuation marks, and other glyphs. Codepages are not the same for each language. Some languages such as Japanese and Hindi have multi-byte characters, while others like English and German only need one byte to represent each character. The CodePage property is read/write.

Syntax

Response.CodePage [= CodePageID ]
   

Parameters

CodePageID

An integer representing the character formatting codepage. You can find codepage integers at MSDN Web Workshop under the column for FamilyCodePage.

Notes

Setting Response.CodePage explicitly affects a single page, where Session.CodePage affects all responses in a session.

If Response.CodePage is not explicitly set in a page, it is implicitly set by Session.CodePage, if sessions are enabled. If sessions are not enabled, Response.CodePage is set by @CodePage, if @CodePage is present in the page. If there is no @CodePage in the page, Response.CodePage is set by the AspCodePage metabase property. If the AspCodePage metabase property is not set, or set to 0, Response.CodePage is set by the system ANSI codepage.

There can be only one codepage per response body, otherwise incorrect characters are displayed. If you set the codepage explicitly in two pages where one is called by the other with #include, Server.Execute, or Server.Transfer, usually the parent page decides the codepage. The only exception is if Response.CodePage is explicitly set in the parent page of a Server.Execute call. In that case, an @CodePage command in the child page overrides the parent codepage.

Literal strings in a script are still encoded using @CodePage (if present) or the AspCodePage metabase value (if set), or the system ANSI codepage. If you set Response.CodePage or Session.CodePage explicitly, do so before sending non-literal strings to the client. If you use literal and non-literal strings in the same page, make sure the codepage of @CodePage matches the codepage of Response.CodePage, or the literal strings are encoded differently from the non-literal strings and display incorrectly.

If the codepage of your Web page matches the system defaults of the Web client, you do not need to set a codepage in your Web page. However, setting the value is recommended.

If the codepage is set in a page, then Response.Charset should also be set. The codepage value tells IIS how to encode the data when building the response, and the charset value tells the browser how to decode the data when displaying the response. The CharsetName of Response.Charset must match the codepage value, or mixed characters will be displayed in the browser. Lists of CharsetNames and matching codepage values can be found at MSDN Web Workshop under the columns for Preferred Charset Label and FamilyCodePage.

The file format of a Web page must be the same as the @CodePage used in the page. Notepad.exe allows you to save files in UTF-8 format or in the system ANSI format. For example, if @CodePage is set to 65001 indicating UTF-8, the Web file must be saved in UTF-8 format. If @CodePage is set to 1252 indicating English or German, the Web file must be saved in ANSI format on an English or German system. If you want to save a page in the ANSI format for a language other than your system language, you can change your default System Locale in Regional Options from the Control Panel. For example, once you change your system locale to Japanese, any files you save in ANSI format are saved using the Japanese codepage and are only readable from a Japanese System Locale.

If you are writing and testing Web pages that use different codepages and character sets (for example, creating a multi-lingual Web site), remember that your test client-computer must have the language packs installed for each language you wish to display. You can install language packs from Regional Options in the Control Panel.

Example

The following example shows the home page of a multi-lingual site. The home page is saved in UTF-8 format so characters from all languages can be shown. The home page redirects the client to a page of their language by using the ServerVariable HTTP_ACCEPT_LANGUAGE to discern the language of the client.

--- Default.asp ---

<%@ CodePage=65001 Language="VBScript"%> <%
   ' Default.asp
   ' This file is saved in UTF-8 format.
   ' The codepage of the system doesn't matter because
   ' you are setting @CodePage, Response.CodePage, and Response.Charset.
   ' Otherwise, the system codepage of the server would be the default.

   Response.CodePage = 65001
   Response.CharSet = "utf-8"

   ' Redirect to the correct home page based on the client language.
   Select Case Request.ServerVariables("HTTP_ACCEPT_LANGUAGE")

     Case "en-us", "en", "fr", "fr-fr", "es", "es-es", "zh", "zh-cn", "zh-tw"
       Response.Redirect Request.ServerVariables("HTTP_ACCEPT_LANGUAGE") & "Start.asp"

     Case Else
       %>
       Welcome.  Click here to go to the English Web site.

Bienvenue. Cliquetez ici pour aller au Web site francais.

Recepcion. Haga clic aqui para ir al Web site espanol.

[Chinese characters with a link]

[Chinese - Taiwan characters with a link]

<% End Select %>

--- En-usStart.asp ---

<%@ Language="VBScript" %>
   <% Response.Redirect "enStart.asp" %>

--- EnStart.asp ---

<%@ CodePage=1252 Language="VBScript"%>

   <% 
   ' enStart.asp
   ' This file is saved in ANSI format on US English system locale.
   ' The language of the system doesn't matter
   '  because you are setting @CodePage and Response.CodePage.
   ' Otherwise, the system codepage of the server would be the default.

   Response.CodePage = 1252
   Response.CharSet = "windows-1252" 

   Response.Write "

News for Today

" %> You can insert more content here, possibly using the
IIS Content Linking component, the
IIS Content Rotator component, or the
IIS Ad Rotator component.

Applies To

Response Object

See Also

Charset, Accommodating International Clients

Platform SDK Release: January 2002
  Contact Platform SDK   Order a Platform SDK CD Online

 

Page 3: Response Object: - Page: Response Object - Link: LCID - Directory and file name: Winnt/Help/Iishelp/Iis/Htm/Asp/Vbob055w.htm Paste the following code in Notepad, name the file Vbob055w.htm, and then save the file in the Winnt/Help/Iishelp/Iis/Htm/Asp directory: LCID
 
Platform SDK: Internet Information Services 5.1

LCID

The LCID property specifies how dates, times, and currencies are formatted. LCIDs are not the same for each geographical locale. Some locales format dates as YY-MM-DD and some format dates as MM-DD-YYYY. The LCID property is read/write.

Syntax

Response.lcid [= LocaleID ]
   

Parameters

LocaleID

An integer representing the geographical locale. You can find locale integers at MSDN Library.

Notes

Setting Response.LCID explicitly affects a single page, where Session.LCID affects all responses in a session.

If Response.LCID is not explicitly set in a page, it is implicitly set by Session.LCID, if sessions are enabled. If sessions are not enabled, Response.LCID is set by @LCID, if @LCID is present in the page. If there is no @LCID in the page, Response.LCID is set by the AspLCID metabase property. If the AspLCID property is not set, or set to 0, Response.LCID is set by the default system locale.

Response.LCID can be set multiple times in one Web page and used to format data each time. Some locales need the matching codepage to be set to display characters properly. For example, to display dates and times in several locales on one page, the codepage must be set to UTF-8 (65001) to show all the characters.

If you set Response.LCID or Session.LCID explicitly, do so before displaying formatted output. Setting Response.LCID changes the locale for both the ASP application and the scripting engine. Using the VBScript function setLocale() only changes the locale for the scripting engine.

If the locale of your Web page matches the system defaults of the Web client, you do not need to set a locale in your Web page. However, setting the value is recommended.

If the locale is set in a page, and the codepage is set to display the characters properly, then Response.Charset should also be set. The codepage value tells IIS how to encode the data when building the response, and the charset value tells the browser how to decode the data when displaying the response. The CharsetName of Response.Charset must match the codepage value, or mixed characters are displayed in the browser. Lists of CharsetNames and matching codepage values can be found at MSDN Web Workshop under the columns for Preferred Charset Label and FamilyCodePage.

If you are writing and testing Web pages that use different locales, codepages, and character sets (for example, creating a multi-lingual Web site), remember that your test client computer must have the language packs installed for each language you wish to display. You can install language packs from Regional Options in the Control Panel.

Example

The following example displays the date, time, an amount of money, and a decimal value in different locales. The codepage is set to UTF-8 to display all the characters properly.

--- Response_LCID.asp ---

<%
   ' This file does not need @LCID or @CODEPAGE and
   '  it does not need to be saved in UTF-8 format because 
   '  there are no literal strings that need formatting or encoding.

   Response.Codepage = 65001
   Response.Charset = "utf-8"

   ' See what happens when you uncomment the lines below.
   'Response.Codepage = 1252
   'Response.Charset = "windows-1252"

   ShowDateTimeCurrency 1033, "North America"
   ShowDateTimeCurrency 1041, "Japan"
   ShowDateTimeCurrency 1049, "Russia"
   ShowDateTimeCurrency 1031, "Germany"
   ShowDateTimeCurrency 1025, "Saudi Arabia"
   ShowDateTimeCurrency 1081, "India"
   ShowDateTimeCurrency 2052, "China"
   ShowDateTimeCurrency 1042, "Korea"

   Sub ShowDateTimeCurrency(iLCID, sLocale)
     Response.LCID = iLCID
     Response.Write "" & sLocale & "
" Response.Write FormatDateTime(Date, 1) & "
" Response.Write FormatDateTime(Time, 3) & "
" Response.Write FormatCurrency(1000) & "
" Response.Write FormatNumber(50, 3, 0, 0, -1) & " & " & FormatNumber(.02, 3, 0, 0, -1) & "

" End Sub %>

Applies To

Response Object

See Also

Charset, CodePage, Accommodating International Clients

Platform SDK Release: January 2002
  Contact Platform SDK   Order a Platform SDK CD Online

 

Page 4: ASP Tutorial: - Page: ASP Tutorial - Link: IIS snap-in - Directory and file name: Winnt/Help/Iishelp/Iis/Htm/Asp/Iisbuti.htm Paste the following code in Notepad, name the file Iisbuti.htm, and then save the file in the Winnt/Help/Iishelp/Iis/Htm/Asp directory: IIS snap-in

IIS Snap-in

The Internet Information Services (IIS) snap-in for the Microsoft Management Console (MMC) is a graphical interface for configuring your Web, FTP, SMTP, or NNTP sites. You can configure IIS security, performance, and reliability featues. You can add or delete sites; start, stop, and pause sites; backup and restore server configurations; and create virtual directories for better managing content, to name only a few of the administrative capabilities.  In previous releases of IIS, this tool was called the Internet Service Manager.

To launch the IIS snap-in

From the Start menu, click Programs, Administrative Tools, and then Internet Information Services. The IIS snap-in appears.

To launch the snap-in from the Run dialog box:

  1. From the Start menu, click Run. The Run dialog box appears.
  2. In the Open text box, type inetmgr.
  3. Press ENTER. The IIS snap-in appears.

You can also access IIS from the Computer Management Window. Accessing IIS in this way does not give you the range of administration options offered by the IIS snap-in; however, it does offer quick access and limited management options for your Web sites.

  1. Click Start, right-click My Computer, and click Manage from the drop-down list. The Computer Management window appears.
  2. In the left pane, expand the Services and Applications tree.
  3. Click Internet Information Services. The names and states of your Web sites appear in the right pane. Expand the Internet Information Services tree in the left pane and any subsequent Web site trees to see a list of directories and virtual directories for that Web page.

For more information on using the IIS snap-in and administering IIS, see the Server Administration Guide.

Additional query words: iis, 5.1, online, documentation, xp ====================================================================== Keywords : kbdocerr Technology : kbiisSearch kbiis510 Version : : Issue type : kbbug Solution Type : kbpending ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 2002.