Microsoft KB Archive/156675

= 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.

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

 Run Dcomcnfg.exe (located in the System32 subdirectory.) Select the Default Security tab. Click the Edit Default button for Default Access Permissions. If the computername\IUSR_computername account is not listed, click Add to add this account. Click Allow Access for the computername\IUSR_computername account.</li> Repeat this process for the Default Launch Permissions group, specifying Allow Launch for the computername\IUSR_computername account.</li></ol> </li> 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:

<ol style="list-style-type: lower-alpha;"> Run Dcomcnfg.exe.</li> Click the Applications tab.</li> Double-click the name of the server you want to launch from Denali.</li> Click the Identity tab.</li> Click This User and specify the required information (User name and Password) for the account you want to use when launching the local server.</li></ol> </li></ol>

<div class="references_section">