Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 21st, 2009, 08:34 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default Running application on the server fired by client

I have an application which needs to talk to an MYOB data file. The ASP page uses an ODBC connection. After research and talks with MYOB the only way we have found that works is MYOB needs to be running on the server.
Yesterday hours were spent identifying how to get this done. The following post is what I found most useful:
http://www.tek-tips.com/viewthread.cfm?qid=1181274&page=1
After:
Ø registering the aspexec.dll
Ø Changing security in Premier12 folder to have Network Service, Local Service, Users to have Full Control
Ø Changing security for system32\ntdll.dll for all users to have Full Control
Ø Changing WWW Service to Interact with Desktop
And running this code:
Dim Executor
Dim strResult
Set Executor = Server.CreateObject("ASPExec.Execute")
'Executor.Application = "C:\Windows\system32\Calc.exe"
Executor.Application = "C:\Premier12\myobp.exe"

Executor.Parameters = "\\melbdcsql02\company\myob\MYOB Premier\Premier 2008_09 Test.MYO"
Executor.ShowWindow = True
Executor.TimeOut = 120
strResult = Executor.ExecuteWinApp
Response.Write(strResult & "<BR>")

It fails to run the application. If we try to run the calc.exe or notepad.exe they appear in the processors tab in task manager but we do not see them. Any idea how we can get an application to run on the server initiated by ASP code on the client?
Is this to big of an issue? If we get it done can we close it? Or can MYOB run permanently on the server which may or may not be a good idea. We have top level access to the server and can change any settings
TYIA
__________________
Wind is your friend
Matt
Reply With Quote
  #2 (permalink)  
Old May 21st, 2009, 11:53 PM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

ASPExec is a pretty ancient component, created in the days of IIS 2 and IIS 3. Whether it still works with current versions of IIS is anybody's guess.

You'd probably be better off just using the MS WSH shell.

Something like this:
Code:

Code:
 Set oShell = Server.CreateObject("Wscript.Shell")
oShell.Run "C:\Premier12\myobp.exe \\melbdcsql02\company\myob\MYOB Premier\Premier 2008_09 Test.MYO"

Or you might need to prefix the call to the .exe with %ComSpec%

But I wouldn't expect any window to appear. Modern web servers don't want to allow apps to open windows on the server machine, for good reason.

Reply With Quote
  #3 (permalink)  
Old May 22nd, 2009, 12:13 AM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

Aftenoon...Trial and error has seems to tell me the MS WSH shell works on XP but seesm to fail on 2003 server. Or I should say running the code on XP makes it apear on the process tab in task manager however it does not on the 2003 server. Any suggesetions why? The 2003 server is the production environement.

Thanking you
__________________
Wind is your friend
Matt
Reply With Quote
  #4 (permalink)  
Old May 22nd, 2009, 12:39 AM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Permissions?? You have to allow "out of process" components from IIS for WSH to work. It does *NOT* run in the same process as the web server. I've never worked with Win2003 Server, directly, so not sure. But that's the likely culprit. Just an IIS setting. Look in the docs for "out of process".
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Good book for developing Client/Server Application vbn Beginning VB 6 0 July 10th, 2006 06:08 AM
Application is not running on SharePoint Server swadhinm ASP.NET 1.0 and 1.1 Professional 1 January 13th, 2006 04:52 PM
Client/Server application Israr Classic ASP Databases 0 March 18th, 2005 08:20 AM
help for running dynamic client/server pgm in rmi sivapmk J2EE 3 January 17th, 2004 10:20 AM
vb application client server data access louisantony Access VBA 0 December 30th, 2003 08:22 AM



All times are GMT -4. The time now is 02:43 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.