Microsoft Knowledge Base Email Alertz

(156675) - 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.

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 156675 - Last Review: May 14, 2007 - Revision: 5.3

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

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:
http://support.microsoft.com/search/default.aspx?qu=vinterdev (http://support.microsoft.com/search/default.aspx?qu=vinterdev)
For more information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
142676  (http://kbalertz.com/Feedback.aspx?kbNumber=142676/ ) How to correct common User32.dll file errors
217202  (http://kbalertz.com/Feedback.aspx?kbNumber=217202/EN-US/ ) PRB: CGI Applications and IIS OOP Applications May Fail

APPLIES TO
  • Microsoft Active Server Pages 4.0
  • Microsoft Internet Information Server 4.0
  • Microsoft Internet Information Services 5.0
Keywords: 
kberrmsg kbprb KB156675
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate