473,378 Members | 1,139 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,378 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

Nov 22 '05 #1
0 879

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

Similar topics

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...
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...
0
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...
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...
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.