473,322 Members | 1,408 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

.NET Remoting Exception: The system cannot find the file spe

Hi,

I am learning .NET remoting and following the tutorial

http://www.csharphelp.com/archives2/archive460.html

Everything works fine.

Now I want to modify it a bit for my personal use but I failed :o

Original file
using System;
using System.Runtime.Remoting.Lifetime;

namespace Remote.Samples
{
public class MyRemoteObject:System.MarshalByRefObject
{
public MyRemoteObject()
{
Console.WriteLine("MyRemoteObject Constructor
Called");
}
public override object InitializeLifetimeService()
{
return null;
}
public string Hello()
{
return "Hello, Welcome to .Net Remoting !";
}
}
}
I want to modify the Hello method so that it will execute the command
I want

[code:1:02ffcbdc44]
public string Hello()
{
ps = new System.Diagnostics.ProcessStartInfo();
ps.FileName= @"C:\USERLIST.EXE"; //The command I want
to execute, I am sure the file is there
ps.RedirectStandardOutput=true;
p = new System.Diagnostics.Process();
ps.UseShellExecute=false;
p.StartInfo=ps;
p.Start(); // this causes Exception
return p.StandardOutput.ReadToEnd();
}
[/code:1:02ffcbdc44]

Output
Exception: The system cannot find the file
specified
How to solve the problem?

Million thanks.

Michael

Jul 21 '05 #1
0 1183

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Uttam | last post by:
Hello, We are at a very crucial decision making stage to select between .Net and Java. Our requirement is to download a class at runtime on the client computer and execute it using remoting or...
1
by: Skip | last post by:
Hi, I get the following exception thrown when I try to run my code: "An unhandled exception of type 'System.Runtime.Serialization.SerializationException' occurred in mscorlib.dll Additional...
4
by: Uchiha Jax | last post by:
Hello everyone, I am a plenty silly person who is trying to learn .NET remoting through trial and error (all articles I read are going over my head at the moment (mostly) so I thought i'd give...
1
by: David Krmpotic | last post by:
Hi All! I have a .NET remoting Client-Server application with Server Activated Objects only.. something is worrying me.. sometimes (rarely), I can't connect to the server although it is...
3
by: Steve | last post by:
I've been following a couple remoting tutorials on the web, they are all pretty much the same. I've got my different applications built(client, server and remote object (dll)) The client is...
15
by: Ron L | last post by:
We are working on a distributed VB.Net application which will access a SQL database located on a known server. Each client will run on the user's local machine. To implement this, we are trying...
0
by: michael_hk | last post by:
Hi, I am learning .NET remoting and following the tutorial http://www.csharphelp.com/archives2/archive460.html Everything works fine. Now I want to modify it a bit for my personal use but...
4
by: Sharon | last post by:
Hi, I'm using the remoting, and I have a remoting object that has a public event that other processes should register to it. But when the client process is registering to the remote event, it...
1
by: Piotrekk | last post by:
Hi I have a strange problem. Here is some input data before I describe the problem. 1. RemoteClass (Mathematica) is compiled into dll and put to GAC 2. Server remoting configuration is done by...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.