Click here to Skip to main content
11,926,429 members (60,244 online)
Rate this:
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 6-Nov-12 0:24am
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.
"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."
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.
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 | Mobile
Web03 | 2.8.151126.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