Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# Remote
Hi,
 
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 6-Nov-12 0:24am
Ashok26359
Comments
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.
--SA
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.
--SA

1 solution

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

Solution 1

You can do in on UNIX (at least, many UNIX-like systems) under Mono:
http://en.wikipedia.org/wiki/Mono_%28software%29[^],
http://www.mono-project.com/[^].
 
The method you would need is System.Diagnostics.Process.Start, please see:
http://msdn.microsoft.com/en-us/library/system.diagnostics.process.start.aspx[^].
 
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.
 
—SA
  Permalink  
Comments
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.
--SA
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...
--SA

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

  Print Answers RSS
0 OriginalGriff 290
1 Jochen Arndt 165
2 DamithSL 125
3 PIEBALDconsult 110
4 Garth J Lancaster 90
0 OriginalGriff 5,790
1 DamithSL 4,601
2 Maciej Los 4,012
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,195


Advertise | Privacy | Mobile
Web02 | 2.8.141220.1 | Last Updated 6 Nov 2012
Copyright © CodeProject, 1999-2014
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