Click here to Skip to main content
11,717,570 members (79,017 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C# Remote

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
Sergey Alexandrovich Kryukov at 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.
Sergey Alexandrovich Kryukov at 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 at 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."
Sergey Alexandrovich Kryukov at 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 at 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.
Sergey Alexandrovich Kryukov at 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
0 Sergey Alexandrovich Kryukov 764
1 OriginalGriff 215
2 F-ES Sitecore 210
3 Maciej Los 140
4 Jochen Arndt 120
0 Sergey Alexandrovich Kryukov 1,494
1 OriginalGriff 535
2 Maciej Los 529
3 Richard MacCutchan 440
4 CHill60 415

Advertise | Privacy | Mobile
Web03 | 2.8.150901.1 | Last Updated 6 Nov 2012
Copyright © CodeProject, 1999-2015
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