all groups > dotnet web services > december 2007 >
You're in the

dotnet web services

group:

Starting Windows Application from .NET Web Service


Starting Windows Application from .NET Web Service David Lloyd
12/26/2007 4:16:00 PM
dotnet web services:
I am developing a .NET web service using Windows Server 2003 and IIS 6.0
which consumes customer information and then attempts to create a new
customer account in an accounting application (i.e. QuickBooks). For
unattended access to the accounting application, an exception for the
application attempting to access the accounting application must be granted
through the accounting application user interface the first time.

I am able to activate this exception dialog box through a Windows
application, however, calls to my web service results in an error,
essentially telling me that I don't have the necessary exception, but not
activating the exception dialog box in order to grant the exception. Once I
have the exception, the web service can access the application without user
intervention.

Something is preventing the web service from activating the necessary
accounting application exception dialog box. I have attempted numerous
configurations including the following: running the application pool under
an administrative account (for testing purposes), setting the "Allow service
to interact with the desktop" property for the World Wide Web Publishing and
IIS Admin Service, verfiying the ACLs of the appropriate folders, and
changing app pool uesr accounts. In addition, there is a configuration where
I can use an out-of-process COM server supplied by accounting application to
perform the same operation. This configuration yields the same error.

What other configuration issues might prevent the web service from
successfully activating the exception dialog box? Is there an issue that
would prevent the web service from interacting with the desktop?
Alternatively, Is there a way to configure a specific security context for
the accounting application? I would appreciate any insights.

Thank you.
Re: Starting Windows Application from .NET Web Service John Saunders [MVP]
12/28/2007 7:49:31 PM
[quoted text, click to view]

First, post the complete exception, don't just describe it. Surely it's
possible that our answer would be different depending on which exact
exception you received? Please post the result of ex.ToString() so that any
InnerException chain is included.

Second, where do you expect the dialog box to display? The web service does
not have a display device associated with it. How were you planning on
filling in the fields of the dialog box? There is no keyboard associated
with the web service.

Finally, you should really ask the QuickBooks developers this question, as
this is probably not a generic "how do I run any Windows application from a
web service" question, but rather "how do I run this particular QuickBooks
command from a web service"?
--
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer

Re: Starting Windows Application from .NET Web Service David Lloyd
12/31/2007 7:41:01 AM
Thank you for your response. The error message is QuickBooks specific and
pretty much as described, but here is the exact text: "This application is
not allowed to log into this QuickBooks company data file automatically. The
QuickBooks administrator can grant permission for an automatic login through
the Integrated Application preferences."

The exception dialog box is launced from the QuickBooks application the
first time the "integrated application" (in this case the web service) tries
to access the QuickBooks file. The idea is to have QuickBooks open on the
web server, call the web service, have the open QuickBooks application
display the execption dialog box (a QuickBooks form), fill in the dialog box
for the exception, and click OK. Subsequent calls from the Web Service will
see the previously granted exception and be allowed access automatically.
This is similar to how MAPILabs Outlook Security Add-In functions for
granting security exceptions to Outlook from third-party applications.

Regarding point number three, I have traversed the QuickBooks developer
information and newsgroups exhaustively prior to this post. I am not the
first to blaze this trail according to the QuickBooks newgroups, but there
are really no comprehensive replies that one can use to discern the
appropriate configuration. Windows Server 2003 is not considered a
supported QuickBooks operating system although shared QuickBooks files
routinely reside on servers with this O/S.

Given the lack of QuckBooks related information, I decided to try and
approach the issue from a more general IIS configuration standpoint. From
what I have read in the IIS/Web Service newsgroups, others have tried similar
configurations but there solutions (see first post) have not worked in my
particular instance.

Thanks again.

[quoted text, click to view]
AddThis Social Bookmark Button