By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,231 Members | 1,279 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,231 IT Pros & Developers. It's quick & easy.

Command line app won't write when run from ASP

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.