PRB: ASP ?????? 80004005 "???? ????? ?? ??? ???? ????"

???? ?????? ???? ??????
???? ID: 306345 - ?? ???????? ?? ?????? ??? ?? ?? ???? ???? ???? ??.
??? ?? ??????? ???? | ??? ?? ??????? ????

?? ????? ??

?????

?? ?? ActiveX ???? ???????? (ADO) ?? ????? ODBC ??????? ?? ??????? ??? ??? ?????? ????? ????? (ASP) ????? ?? ????? ?? ???, ???? ????? ?????? ????? ??????? ?? ???? ??:
Microsoft OLE DB ??????? ?? ??? ODBC ??????? '80004005' ??????
[Microsoft][ODBC ??????? ???????] ???? ????? ?? ??? ???? ???? ?? ??????? ??????? ????????? ???? ???

????

?? ?????? ?? ? ???? ?? ?? ????? ???? DSN-?????? ??????? ???????? (?? ??????? ???????? ?? ?? ???? ?????? DSN ?? ????? ???? ??) ?? ??? DSN ?? ??????? ???????? ADO ?? ODBC ?? ??? ?? ASP ??? ??? ???? ??????? ??????? ????? ?? ???? ?? ?????? ?? ??????? ?????? ?? ???? ???????? ????

??? ODBC DSN ?? ????? ????

  • Microsoft Windows NT 4.0 ?? Windows 2000 ?????????? ???? ?? ASP ????? ????????? DSN ???????? ???? ?? ?? ????????? ????? ?? ????? ?? ??? ???????? ????????? ???? ?? ?????? ?? ??????? ???? ?? ??? ????? ???? ???? ?? ?? ??????????? ????????
  • ADO ??????? ???????? ??? ????????? ???? ?? ?? ?????? ODBC DSN IIS ????? ?? ????? ???? ???
  • ASP???????????,?????? ASP ????????? Global.asa ??? ???? ?? ?? ?? ????? (?? ????? ???? ?? ???? ?? ?????? ASP ????? ??? ?? ??? ??????? ??????? ???) ADO ??????? ???????? ?? ????????? ???? ?? ??? ????? ???? ???? ??? ?? ??????? ???????? ?? ???? ???? ?? ?? ??????? ??????? ????? ?? ??? ??? ????? ???? ??? ?? ?????? ???? ?? ??? ?????? ??Response.Writestatement before the line of code that opens the database connection to display the connection string that is stored in the variable.

Using a DSN-Less Connection String

  • The Windows NT 4.0 or Windows 2000 user account that is used to process the request for the ASP page does not have sufficient permissions to read the registry key that stores the specified ODBC Driver's configuration information. The???????parameter in a DSN-less connection string specifies the ODBC driver that is used to establish the database connection.
  • ??????? ???????? ??? ????????? ODBC ??????? ?? ??? misspelled ??, ?? ??????? ????? ????? (IIS) ????? ?? ??????? ???? ?? ??????? ????????? ???? ???
  • The ASP???????????,????variable that is initialized in the ASP application's Global.asa file (or in an ASP page that is accessed before the page that contains the database connection code) is used to specify the ADO connection string. This connection string variable is not initialized when the code to open the database connection is run. To confirm this, add aResponse.Writestatement before the line of code that opens the database connection to display the connection string that is stored in the variable.

????????

???????????? ???, ????, ?? ????? ?? ????????? ?? ??????? ???? ?? ??? ????? ????? ??? ???? ???????, ??? ?? ????????? ?? ??? ??? ?? ??????? ???? ??? ?? ????? ???????? ??????? ?? ???? ???.. ?????, ????????? ???? ?? ?? ?? ????? ?? ??????????? ???? ???? ???.. ?????? ??????? ?? ???, ????????? ?? ??????? ???? ?? ???? ???? ??? ?? ???.. ???, ??? ??? ?????? ??????? ???? ?? ?? ?? ????????? ?? ???????????? ?? ???? ???.. ????????? ?? ??? ?? ???? ?? ???????????? ???? ?? ????? ?? ???? ??? ???? ??????? ?? ???, Microsoft ?????? ??? ??? ???? ????? ?? ??? ????? ???? ?????? ????? ????::
322756??? ?? ???? ?? Windows ??? ????????? ?? ???????????? ???? ????

Using an ODBC DSN

Insufficient Permissions to Read the DSN Registry Key

Grant the Windows NT 4.0 or Windows 2000 user account Read access to the specified ODBC System DSN registry key as follows:
  1. Determine which account is used to process the request for the ASP page.
  2. ????????????? ??,???????????:regedt32.exe?? ????-????? ????, ?? ???? ???OKto start Registry Editor.
  3. ?????HKEY_LOCAL_MACHINEwindow, browse to theHKLM\SOFTWARE\ODBC\ODBC.INI?????? TheODBC.INIkey contains a subkey for each ODBC SYSTEM DSN that is registered on the server.
  4. Click the DSN registry key for the DSN that is specified in the ADO connection string.
  5. ????????????? ??,?????????.
  6. Add the user account that you identified in step 1 to the list of users who can access this key, and select the????check box for this user.
  7. ????? ????,???? ????, and then close Registry Editor.

Specified DSN Does Not Exist on the IIS Server

Create the specified System ODBC DSN on the IIS Server.

Global.asa Code to Initialize the ADO Connection String Is Not Running

  1. Verify that the IIS Application folder has been set up as an IIS virtual directory with permissions to execute scripts.
  2. Verify that the Global.asa file is located in the IIS application's root directory.
  3. If the Application folder is already set up as an IIS virtual directory, remove and re-create the IIS application.
  4. Refer to the articles that are listed in the "References" section to determine if any of these articles apply to your specific scenario.
  5. Contact Microsoft Product Support Services if the code in Global.asa still does not appear to be running after you perform the preceding steps.

Using a DSN-Less Connection String

Insufficient Permissions to Read the Specified ODBC Driver Registry Key

Grant the Windows NT 4.0 or Windows 2000 user account Read access to the specified ODBC Driver registry key as follows:
  1. Determine which account is used to process the request for the ASP page.
  2. ????????????? ??,???????????:regedt32.exe?? ????-????? ????, ?? ???? ???OKto start Registry Editor.
  3. ?????HKEY_LOCAL_MACHINEwindow, browse to theHKLM\SOFTWARE\ODBC\ODBCINST.INI?????? TheODBCINST.INIkey contains a subkey for each ODBC Driver that is installed on the server.
  4. Click the Driver registry key for the Driver that is specified in the ADO connection string.
  5. ????????????? ??,?????????.
  6. Add the user account that you identified in step 1 to the list of users who can access this key, and select the????check box for this user.
  7. ????? ????,???? ????, and then close Registry Editor.

Driver Name Is Misspelled or Is Not Installed on the IIS Server

Verify that the ODBC Driver name is spelled correctly in the ADO connection string. In addition, verify that the specified driver is installed on the IIS Server. To view a list of ODBC drivers that are installed on a system, look in the ODBC Data Source Administrator (Odbcad32.exe) on the?????????? ?? ????? ????..

Global.asa Code to Initialize the ADO Connection String Is Not Running

  1. Verify that the IIS Application folder has been set up as an IIS virtual directory with permissions to execute scripts.
  2. Verify that the Global.asa file is located in the IIS application's root directory.
  3. If the Application folder is already set up as an IIS virtual directory, remove and re-create the IIS application.
  4. Refer to the articles that are listed in the "References" section to determine if any of these articles apply to your specific scenario.
  5. Contact Microsoft Product Support Services if the code in Global.asa still does not appear to be running after you perform the preceding steps.

??????

?? ??????? ??????? ?????? ??..

???? ???????

The Windows NT 4.0 or Windows 2000 user account whose credentials are used to process a request for an ASP page is determined by the authentication mechanism that the Web Server uses to authenticate the user request. For example, if you use Anonymous authentication, the credentials of the configured IIS Anonymous account (the IUSR_WebServerName> account by default) is used to process the user request. When you use Basic authentication, Microsoft Internet Explorer prompts the user to supply a valid Windows NT 4.0 or Windows 2000 Network UserId and password whose credentials are then used to process the request. For additional information about the supported authentication mechanisms and how they work, refer to the online IIS documentation.

??????

For additional information, click the article numbers below to view the articles in the Microsoft Knowledge Base:
188715Global ASA Not Firing When Visual InterDev Made IIS 4.0 Application
288245PRB: Global.asa Does Not Fire from Personal Web Server on Windows 98
265275FP2000: Global.asa ???? ????? FrontPage ??? ???

???

???? ID: 306345 - ????? ???????: 04 ?????? 2010 - ??????: 2.0
???? ???? ???? ??:
  • Microsoft Internet Information Services 5.0
  • Microsoft Data Access Components 2.1
  • Microsoft Data Access Components 2.5
  • Microsoft Data Access Components 2.6
  • Microsoft Data Access Components 2.6 Service Pack 1
  • Microsoft Data Access Components 2.7
??????: 
kbprb kbmt KB306345 KbMthi
???? ?????? ????????
??????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??.
?????????? ?? ??????? ????????? ??????? ??:306345

??????????? ???

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com