Click here to Skip to main content
13,553,262 members
Rate this:
Please Sign up or sign in to vote.
See more:

Is it possible to use rsh.exe directly though ASP.NET.

RSH is enabled on my machine. So I can use rsh through command prompt.
It even works in a bat file.

But id does not seem to work through C# code.

My understanding is that it is not meant for automation purposes.

Please throw more light on usage of RSH.exe from code.
Posted 5-Nov-12 23:24pm
SAKryukov 6-Nov-12 10:41am
If does not matter if this is RSH.EXE or not -- you can write code which immediately runs of UNIX (depending on what kind of UNIX) -- please see my answer.
SAKryukov 6-Nov-12 10:42am
"Not seem to work" is not informative. Either sort out this part by yourself or provide comprehensive information.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You can do in on UNIX (at least, many UNIX-like systems) under Mono:[^],[^].

The method you would need is System.Diagnostics.Process.Start, please see:[^].

In many cases, you can develop on Windows and run this code under Mono on a different OS without recompilation, if you code is platform-compatible. If you develop accurately, it's usually the case.

Ashok26 6-Nov-12 10:55am
I am not supposed to use any open source code due to approval reasons.

So, I am trying to use existing rsh.exe through .NET.

Is it possible to trigger rsh.exe through process?
The problem I am facing is "The process keeps running and does not return any result."
SAKryukov 6-Nov-12 13:07pm
I so, you are not working in proper team. Ask for help those who approve or disapprove things. By the way, these people probably don't know that you already do, perhaps indirectly.
And I already answered: use System.Diagnostics.Process.Start, that means, this is possible.
Ashok26 7-Nov-12 4:19am
I am using System.Diagnostics.Process.
Everything works fine when I am using Visual Studio devleopment server.
When I use IIS, I get error as "remuser too long".

I am providing user id as arguments to process.
SAKryukov 7-Nov-12 12:39pm
To see the difference, one would need to see your code...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04-2016 | 2.8.180515.1 | Last Updated 6 Nov 2012
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100