|
Can someone please tell me: How to run an application on a remote computer (on the same LAN)????
// This, I think will run my notepad on my machine
Process.Start("notepad", "C:\\Windows\\notepad.exe");
// This, I think will run that remote machine's notepad on my machine.
Process.Start("notepad", "\\\\remote-machine-name\\C$\\Windows\\notepad.exe");
// But how to run that remote machine's notepad on that remote machine.... ????
Thanks for your time ..
|
|
|
|
|
The first thing that comes to my mind, if you want to do this in C# is to make a client and a server. The server being at the remote end which executes processes as instructed by the clients. Or you could use PsExec.
|
|
|
|
|
Thanks for your reply.
You are right. I am basically building client server applications.
Now, what I want to do is that:
1) Execute the server on my machine.
2) Through that server, initialize/execute the clients(.exe) on the client machines.
3) Clients will then start communication with the server.
I actually need help with that 2nd step.
PsExec looks to be interesting, and I will play with it tomorrow and see if that will serve the purpose. But i guess, in this case, I will have to use PsExec instead of my server to initialize the client applications.
Thanks.
Sarfraz
|
|
|
|
|
Anyone who could guide me a little please.....
Thanks....
Sarfraz.
|
|
|
|
|
I have the following classes defined:
public class ControllerPage : System.Web.UI.Page
{
protected long m_nStatusCode;
long PropStatusCode(value)
{
get { return m_nStatusCode; }
set { m_nStatusCode = value; }
}
}
public abstract class DerivedPage : ControllerPage
{
}
public partial class MyPage : DerivedPage
{
public void MyFunction()
{
this.StatusCode = 1;
if (this.StatusCode == 1)
{
}
}
}
I can set the property from the MyPage class, and I can see it being set i the debugger, but when I try to retrieve the value, I don't get anything back. Before I start declaring C# to be one of the most insanely unusable languages I've ever had the displeasure to use, can someone please tell me why this is happening?
I've looked around on the web, but I haven't found a single place that talks about inheritance more than one-class deep.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: but when I try to retrieve the value, I don't get anything back.
This is ASP.NET... are you familiar with the round-tripping in Web Applcations. MyPage is instantiated each trip back to the server. You have to account for the "state" of the variable if you want it to persist across round trips.
led mike
|
|
|
|
|
i hate web programming
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: i hate web programming
Join the club... we are having Jackets made.
led mike
|
|
|
|
|
Where can I order mine?
|
|
|
|
|
What color is the jacket?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: What color is the jacket?
That's a silly question... all colors from the Web Pallet are available of course.
led mike
|
|
|
|
|
For a start, your syntax isn't right. You refer to StatusCode - have you set this as a property somewhere in your ControllerPage class? All I see there is a method called PropStatusCode, which won't compile BTW because you have applied a parameter to it, so it's no longer a property. (Check the other part of your partial MyPage class, because I think that you might have declared StatusCode in there. )
I regularly use classes where the inheritance chain runs more than 1 level deep and I have no problems with it.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
I actually can't see how this even compiles:
John Simmons / outlaw programmer wrote:
long PropStatusCode(value)
{
get { return m_nStatusCode; }
set { m_nStatusCode = value; }
}
That mixes property and method declarations up.
Also:
John Simmons / outlaw programmer wrote: this.StatusCode = 1;
Does not equal
John Simmons / outlaw programmer wrote: long PropStatusCode(value)
There is an additional Prop prefix on Status code in the base class.
|
|
|
|
|
Well, I didn't do a copy paste from the code, so ignore the errors... In any case, the real problem is that I forgot that variables don't persist between page loads. Of course - why would they? That would make web programming too much like regular application programming, and we don't want that, now, do we...
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
HOw can I replace this xml string:
"<marketdata><date>19-Feb-2007 11:26:39<producedby>james Dean<isdifferential>False<forwardcurves><forwardcurve code="\"AL" lme_fut\"="">
to:
"<marketdata><date>19-Feb-2007 11:26:39<producedby>james Dean<isdifferential>False<forwardcurves><forwardcurve code="AL LME_FUT">
Notice removing the backslash i.e. \ from forwardCurve code
Thanks
|
|
|
|
|
Your XML strings are not displayed properly. Try posting again and check the "Ignore HTML tags in this message" option beneath the smilies.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
HOw can I replace this xml string:
"<marketData><date>19-Feb-2007 11:26:39</date><producedBy>james Dean</producedBy><isDifferential>False</isDifferential><forwardCurves><forwardCurve code=\"AL LME_FUT\">
to:
"<marketData><date>19-Feb-2007 11:26:39</date><producedBy>james Dean</producedBy><isDifferential>False</isDifferential><forwardCurves><forwardCurve code="AL LME_FUT">
Notice removing the backslash i.e. \ from forwardCurve code
Thanks
|
|
|
|
|
The string that you have is not valid XML. Are you sure that the string really contains that character, or have you just looked at what the debugger displays?
---
single minded; short sighted; long gone;
|
|
|
|
|
It is what I see in the immediate window
|
|
|
|
|
Then you are chasing ghosts. There is no \ character in the string, it's just displayed the same way that you would write it as a string literal.
---
single minded; short sighted; long gone;
|
|
|
|
|
I think the characters you are talking about were removed when you posted this message.
Still if you have the string. I would just to the .Replace("\","");
So if you have a string:
String tmp = "blablabla\blablabla";
tmp = tmp.Replace(@"\","");
Hope that helps.
Ben
|
|
|
|
|
Hi !
I need to implement udp protocol in C#/VB.net Win Forms that send some request to the broadcast address from specific port and then change to be client and receive multiple answers from the broadcast on the same specific port.
My questions are:
1.Is the first connection should use blocking (synchronous) functions ?
2.Should I close this first socket,and then open another one on the same port in order to get the broadcast answers ?
3.In which way should I get the broadcast answers:a.using asynchronous function and events like BeginSend/EndSend etc or b.using threads ?
4.How do I get multiple answers on the same port in this case ?
I will be glad to get answers/code snippets.
Tnx
AliJ
|
|
|
|
|
I know I've seen this, but I can't find it, so if someone can throw me a URL or two, that would be awesome! I want to take a screenshot without using any APIs or DLLs or other TLAs (just straight C# methods). The reason is that I want to port it to Linux (using Mono).
I'd prefer that it not use anything from Framework 2.0 (only 1.1) because Mono isn't fully implemented for 2.0 yet, but I'll take what I can get.
-Daniel
Typing too fast fro my owngood
|
|
|
|
|
|
You rock. Thanks!
I think I remember that some 2.0 stuff is implemented in mono so far... I'll check it out in MonoDevelop during my lunch.
If not, I'll also see if I can use gdi32.dll (does FC6 even have that dll?..., I ask myself).
Again, thanks!
-Daniel
Typing too fast fro my owngood
|
|
|
|