Server Object error "ASP 0177: 80040154" server. Createobject

Source: Internet
Author: User

1. symptoms:

The following error message is displayed when you try to run an Active Server Page (ASP) page that uses server. Createobject to instantiate an ActiveX component:

Server Object error ASP 0177: 80040154
Server. Createobject failed
/<Path>/<yourasp. asp> <line #>
Server. Createobject call failed. The requested object instance cannot be created.

2. Cause

The following are some typical causes of this error:

    • Your control is incorrectly registered.
    • You do not have sufficient permissions to run this control in "record user"-typically anonymous account. In many cases, the Anonymous Logon account on (IUSR _ <machine>) does not have the appropriate permissions, some directories/files or specific components and their dependencies. At the same time, if the permission settings of some items in the Registry are incorrect, it will cause the control initialization to fail.
    • In the "everyone" group, everyone who has permissions to read certain registry items because of the incorrect concept means that when anyone is there, it actually only describes all authenticated users on the domain/computer.
    • When accessing a file database or $ FoxPro, for example, containing the database file directory does not provide sufficient permissions for authenticated users.

 

3. Solution

Warning the following assumption is that you are familiar with the Internet Information Server and $ edit the registry. It always recommends that you make any changes before backing up the registry.
Because this error is incorrect, permission settings are associated with the file or registry settings, you must complete the following steps:

    1. Find out who the verified user is. To determine which users are authenticated, add the followingCodePage:

      <% Response. Write ("logon_user:" & _ request. servervariables ("logon_user") %>

      Logon_user is empty. If you have been authenticated as iusr_machine. Otherwise, the <domain \ User> authenticated user name of the user attempting to create the object is displayed in logon_user.

    2. Confirm that the authenticated user (or group) has permissions on the required directories, files, and registry keys. This requires knowledge of the registry keys in directories, files, and specific controls. The following is a list of ActiveX Data Objects.

Back to Top

File/directory permissions for specific ADO Cases
\ Inetpub-IUSR _ <machine> read \ Inetpub \ wwwroot-IUSR _ <machine> read \ Program Files \ common files \ System \ ado-IUSR _ <machine> read \ Program Files \ common files \ System \ ole db-IUSR _ <machine> read \ Program Files \ common files \ ODBC \ data sources-IUSR _ <machine> read \ winnt-IUSR _ <Machine> change \ winnt \ system32-IUSR _ <machine> read \ winnt \ system32 \ inetsrv \ ASP-IUSR _ <machine> read \ winnt \ system32 \ inetsrv \ ASP \ cmpcnt-IUSR _ <machine> read \ winnt \ temp-IUSR _ <machine> change

Back to Top

Registry Permissions for specific ADO Cases

Make sure that the following permissions are set on the following keys:

Permission:

<Machine> \ administrator-full control Creator Owner-full control everyone-read interactive-special access (query value, set value, create subkey, enumerate subkeys, policy, delete) system-full control

Key:

 
Hkey_classes_root \ licences \ CEDD4F80-B43C-11cf-837C-00AA00573EDE hkey_classes_root \ ADODB. Command \ ADODB. Connection \ ADODB. Parameter \ ADODB. recordset

Back to Top

Case sensitivity of files and folders

Make sure that the database files and folders contain database files that provide read, write, and execution permissions for authenticated users or groups.

4. More:

Procedure
    1. If ASP has been correctly installed, run the "ADO use server. Createobject" example and check "Active Server Page roadmap \ more samples subfolders"
    2. Make sure that regsvr32 is registered in all DLL files.
    3. Make sure that the DLL and registry key are not registered and point to the correct versions.
    4. Make sure that any DLL uses the unit thread model and is not a single thread (see note 3 below ).
    5. Make sure that the primary domain controller (PDC) grants everyone the "permission to Access this computer from the network. If IIS is a PDC, make sure that IUSR _ <machine> still has the permission to log on locally.

Back to Top

Quick permission check procedure
    1. Force anonymity in IIS service manager by clearing basic and NT question and Response (ntcr)
    2. To check whether it allows a differential Administrator group to temporarily add IUSR _ <machine>. If so, the problem is about permissions.
    3. Open the NT Review (as described below) and try again.

Back to Top

Do not so quick permission check procedure
    1. Forcibly clear the anonymity of the basic and NT question and Response (ntcr) in the IIS service manager.
    2. Create a new NT user account named iusr_test.
    3. The root drive of iusr_test is fully controlled and these permissions are continuously stacked down. Later, iusr_test is deleted to delete them from any directory or file.
    4. Open the NT Review (as described below) and try again.

To enable nt audit, perform the following operations:

To enable audit, open User Manager and select "Audit" from policy. Select "file and object access. Open "Windows NT Resource Manager" and select the root directory of your hard disk. Right-click and select "properties. Select the Security tab and click review. Add a user of interest (returned by the ASP page or iusr_machine) and select the check boxes for all failures. Make sure that these settings are applied to all folders. Use Event Viewer to view any access failures (select "security" in the log menu. Make sure that you close the audit and make changes.

NOTE 2: jet uses the system temp and TMP environment variables to specify the location of the temporary files created during the jet operation. By default, these environment variables are user-defined, rather than system range settings. You can perform one of these two operations.

Option 1. Add the following two lines in autoexec. BAT:

 
Set temp = c: \ Temp set TMP = c: \ Temp

Option 2. Right-click my computer:

    1. Click Properties and select the environment tab.
    2. Click the entry in the system Variable list box (the previous one.
    3. In the variable and value Edit Control, type the following:
      Variable = Temp value = c: \ Temp
    4. Click settings. Now, see system variables added to the temp list.
    5. Repeat this process as the TMP variable.
    6. Restart the computer to make the change take effect.

In addition, the IUSR _ <machine> must be changed to the WINNT directory using the ACCESS database driver.ProgramThe permission to create a temporary file.

Note 3: by default, ASP creates a single-threaded client. This means that only the single-threaded inproc server can pass the required security context by IIS. All other thread models run in the system context. This means that the system that uses the security context in the single-thread model DLL is not expected to start the authenticated user identity

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.