Microsoft Knowledge Base Email Alertz

(202798) - When calling a Desktop Application (such as Microsoft Word) from Active Server Pages (ASP), the following behavior might occur: The Browser (IE4) is not responding at all, it appears to be hanging.

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: 202798 - Last Review: November 17, 2003 - Revision: 3.1

PRB: Browser Stops When Calling a Desktop Application from Active Server Pages

This article was previously published under Q202798

On This Page

SYMPTOMS

When calling a Desktop Application (such as Microsoft Word) from Active Server Pages (ASP), the following behavior might occur:
The Browser (IE4) is not responding at all, it appears to be hanging.

CAUSE

The error occurs because the server is running in the IUSR_computername account and cannot connect to the window station and desktop of the Internet Information Server (IIS) process in the LocalSystem account.

The implication of this to IIS applications is that the IIS service has its own desktop. If your IIS application interacts with a desktop in any way (for instance, if it displays a message box), then it displays that message box on a desktop that cannot be seen on the computer's monitor. Similarly, an IIS application is not able to send or post messages to an application on the interactive desktop.

RESOLUTION

You can resolve this problem by configuring the server using the RunAs registry value to run under a user account. You can specify The interactive user if an interactive user is logged on; otherwise, use a specific user account if an interactive user is not logged on. If you specify The interactive user, the server runs in the interactive user's account and connects to the interactive desktop. If a specific user account is specified, the server runs in that account and connects to its own window station and desktop.

For example, use the following steps to configure a server to run under a user account:
  1. Run Dcomcnfg.exe.
  2. Click the Applications tab, and then click the server.
  3. Click the Properties button, and then click the Identity tab.
  4. Select The interactive user if an interactive user will be logged on when the server is launched, or select This user and specify a user if an interactive user will not be logged on when the server is launched. This adds a RunAs registry entry under the APPID key of the server.
Make sure that the specified user is given launch and access permissions to the server.

If you are using a DLL to create an instance of the Desktop Application, you'll also have to create a Microsoft Transaction Server (MTS) package for your DLL, and give this package the identity of The interactive user if an interactive user will be logged on when the server is launched. Or select This user and specify a user if an interactive user will not be logged on when the server is launched.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce Behavior

Create an ASP page with the following code:
<%
Set objWdDoc = Server.CreateObject("Word.Document")
Response.Write ("Object created: ") & IsObject(objWdDoc)

objWDDoc.SaveAs "c:\mydoc0.doc"
objWDDoc.Close
Set objWDDOC = Nothing
%>
				
View the ASP page from a browser (such as Internet Explorer 4.0). The Browser does not responding at all.

REFERENCES

For additional information, click the article number below to view the article in the Microsoft Knowledge Base:
156223  (http://kbalertz.com/Feedback.aspx?kbNumber=156223/EN-US/ ) How To Launch OLE Servers from ISAPI Extensions
159311  (http://kbalertz.com/Feedback.aspx?kbNumber=159311/EN-US/ ) Instantiating Remote Components in MTS and IIS

APPLIES TO
  • Microsoft Internet Information Server 4.0
  • Microsoft Active Server Pages 4.0
  • Microsoft Transaction Services 2.0
Keywords: 
kbinetdev kbprb KB202798
       

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