473,396 Members | 1,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Command line app won't write when run from ASP

I've made a command line app. two in fact. one in dotnet and the other
vb6 to see if that made a dif. The commandline app writes to a file.
this works fine when I run it from windows. If I run it from my ASP.NET
Web app e.g.:

Dim oWShell
oWShell = CreateObject("WScript.Shell")
oWShell.Run("C:\JaXpeak\app.exe arg1 arg2", 1, True)

And it creates the file , but fails to write anything in it.

Please help, I'm going nuts.

I'm sure its a permissions thing, but what I have no idea. Tried lots
of faffing in the .NET Framwork admin. Given all relevant directories
read and write access for web users. Even given Everthing fulltrust.

Please help.

Nov 23 '05 #1
4 1163
If you made the app, why didn't you write the error to the event log
so you'd know exactly what the issue is. It is undoubtedly
a permissions issue. It could be the folder to write to,
could be permission to run the app, or a permission
to use something you've referenced.

Typically, people would write the relevant business logic
in its own assembly that could either be called directly
in the web app or the console app.

The notion that you are purposely triggering a console
app confuses me. I can only assume that you want to
fire and forget. Wouldn't a windows service that
reacts to messages in a message queue be a
more stable implementation of this?

--
Robbe Morris - 2004/2005 Microsoft MVP C#
http://www.masterado.net

"Phil" <ph**********@googlemail.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
I've made a command line app. two in fact. one in dotnet and the other
vb6 to see if that made a dif. The commandline app writes to a file.
this works fine when I run it from windows. If I run it from my ASP.NET
Web app e.g.:

Dim oWShell
oWShell = CreateObject("WScript.Shell")
oWShell.Run("C:\JaXpeak\app.exe arg1 arg2", 1, True)

And it creates the file , but fails to write anything in it.

Please help, I'm going nuts.

I'm sure its a permissions thing, but what I have no idea. Tried lots
of faffing in the .NET Framwork admin. Given all relevant directories
read and write access for web users. Even given Everthing fulltrust.

Please help.

Nov 23 '05 #2
Thanks for the reply Robbe

Re a windows service, quite prob, but as I installed .NET for the first
time this week - so I've got a lot to learn. I'll look in to it.

Got any handy hints for starting to look at "messages in message
queues"?

Would be very greatful.

I would still like to know how to get this woking though (just so I
know). How do I set permissions for things I referance (I think that
might be the prob)?

Cheers,
Phil

Nov 23 '05 #3
First things first, log the error message in your console
app to the event log so you can find out what the
real error is.

Here is a code sample that works with message queues

http://www.eggheadcafe.com/articles/20021221.asp

You'll see how easy it would be to write a message
to the queue with your ASP.NET app and then have
some other external app poll the queue to get what
it needs to trigger the job.

--
Robbe Morris - 2004/2005 Microsoft MVP C#
http://www.masterado.net

"Phil" <ph**********@googlemail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Thanks for the reply Robbe

Re a windows service, quite prob, but as I installed .NET for the first
time this week - so I've got a lot to learn. I'll look in to it.

Got any handy hints for starting to look at "messages in message
queues"?

Would be very greatful.

I would still like to know how to get this woking though (just so I
know). How do I set permissions for things I referance (I think that
might be the prob)?

Cheers,
Phil

Nov 23 '05 #4
again thanks for the help.

1) Don't know how to send the error.

2) I'm a VB guy and so your messaging example isn't much help (thanks
for posting it though)

So how do I get the error message from my .NET console app.? It returns
some errors (I've seen it do this when building it), but it doesn't
seem to throw any when it fails to write. Anyway I'm now concerned that
it is the ActiveX I'm calling via the console app that fails. This is,
I think, due to permissions. So how do I set permissions for
dependancies like referanced dlls (which haven't been made in .NET)?

Cheers

Nov 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Edvard Majakari | last post by:
Hi, I was wondering what would be the most elegant way for creating a Python class wrapper for a command line utility, which takes three types of arguments: 1. options with values (--foo=bar)...
4
by: lkrubner | last post by:
I'd like to write a PHP script to be used from the command line on a Unix machine. I'd like for the script to put together a string, turn it into a web page, print it, then return control the...
7
by: Todd McNeill | last post by:
Hi- Something was just pointed out to me this morning. According to the V8 Command Reference, the RUNSTATS command no longer uses the SHRLEVEL CHANGE/REFERENCE clauses, and it looks to be...
8
by: jcrouse | last post by:
I am trying to run a command from a command prompt using the shell command. Here is the syntax I want to execute: Shell(lblMameExePath.Text & " -listinfo >" & Application.StartupPath &...
16
by: John Salerno | last post by:
Here's my new project: I want to write a little script that I can type at the terminal like this: $ scriptname package1 where scriptname is my module name and any subsequent arguments are the...
5
by: nic | last post by:
On my system (WinXP) typing the following line into command prompt(cmd.exe) successfully scans the file test1.txt: "c:\Program Files\Grisoft\AVG Free\avgscan.exe" "c:\program...
10
by: jimmy | last post by:
Hi again, sorry for posting two questions so close together but im working on a school project which is due in soon and running into some difficulties implementing the database parts. I have the...
1
by: Vinnie123 | last post by:
What in the world is going on here? I cannot get my "break" statement to work. When I run this class, I get the following output: >>> ---BREAK--- 0 WHY WON'T YOU BREAK count = 0 Traceback...
7
by: Jwe | last post by:
Hi, I've written a program which has both a command line interface and Windows form interface, however it isn't quite working correctly. When run from command line with no arguments it should...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.