Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Command line app won't write when run from ASP

Reply
Thread Tools

Command line app won't write when run from ASP

 
 
Phil
Guest
Posts: n/a
 
      11-23-2005
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.

 
Reply With Quote
 
 
 
 
Robbe Morris [C# MVP]
Guest
Posts: n/a
 
      11-23-2005
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" <> wrote in message
news: 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.
>



 
Reply With Quote
 
 
 
 
Phil
Guest
Posts: n/a
 
      11-23-2005
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

 
Reply With Quote
 
Robbe Morris [C# MVP]
Guest
Posts: n/a
 
      11-23-2005
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" <> wrote in message
news: 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
>



 
Reply With Quote
 
Phil
Guest
Posts: n/a
 
      11-23-2005
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RUN/execute a Command-Line command from an ASP page. Lucas Cowald ASP .Net 4 10-23-2003 11:09 AM
RUN/execute a Command-Line command from an ASP page Lucas Cowald ASP .Net Building Controls 1 10-22-2003 04:26 PM
RUN/execute a Command-Line command from an ASP page. Lucas Cowald ASP .Net Datagrid Control 1 10-22-2003 12:22 PM
RUN/execute a Command-Line command from an ASP page. Lucas Cowald ASP .Net Security 0 10-22-2003 11:15 AM
RUN/execute a Command-Line command from an ASP page. Lucas Cowald ASP .Net Mobile 0 10-22-2003 11:15 AM



Advertisments