Microsoft KB Archive/156675

From BetaArchive Wiki
Knowledge Base


PRB: Server.CreateObject Fails for Local Servers(EXEs)

Article ID: 156675

Article Last Modified on 5/14/2007



APPLIES TO

  • Microsoft Active Server Pages 4.0
  • Microsoft Internet Information Server 4.0
  • Microsoft Internet Information Services 5.0



This article was previously published under Q156675


SYMPTOMS

When you call Server.CreateObject on a local server, the following error may occur:

Initialization of dynamic-link library C:\Winnt35\System\User32.dll failed. The process is terminating abnormally.

As a result, the local server is not launched.

CAUSE

This error occurs because Microsoft Internet Information Server (IIS) attempts to launch the local server using the IUSR_computername(Internet Guest) account. The IUSR_computername account does not have access to the window station and desktop, so the User32.dll file fails to load. This problem does not occur if you launch an In-Proc(DLL) server because it runs in the same process space as IIS, which has already loaded User32.dll at startup.

RESOLUTION

In order to launch servers from Internet Information Server, you must complete the following steps. Step 1 is necessary for both In-Proc(DLL) and Local(EXE) servers, while step 2 is necessary only for local servers.

  1. Set Default Launch and Activation permissions for IUSR_computername. The following steps give the Internet Guest account permission to access and launch applications:

    1. Run Dcomcnfg.exe (located in the System32 subdirectory.)
    2. Select the Default Security tab.
    3. Click the Edit Default button for Default Access Permissions.
    4. If the computername\IUSR_computername account is not listed, click Add to add this account.
    5. Click Allow Access for the computername\IUSR_computername account.
    6. Repeat this process for the Default Launch Permissions group, specifying Allow Launch for the computername\IUSR_computername account.
  2. Configure the RunAs registry value for the specific local server. The steps outlined below specify a specific account that is used to launch a local server. It may be a good idea to create a special local account on your server for this purpose. Make sure that this account has permission to launch and access the desired local server:

    1. Run Dcomcnfg.exe.
    2. Click the Applications tab.
    3. Double-click the name of the server you want to launch from Denali.
    4. Click the Identity tab.
    5. Click This User and specify the required information (User name and Password) for the account you want to use when launching the local server.


REFERENCES

For the latest Knowledge Base articles and other support information on Visual InterDev and Active Server Pages, see the following page on the Microsoft Technical Support site:

For additional information, click the article numbers below to view the articles in the Microsoft Knowledge Base:

142676 Overcoming User32.dll Initialization Failure Errors


217202 PRB: CGI Applications and IIS OOP Applications May Fail


Keywords: kberrmsg kbprb KB156675