Click to See Complete Forum and Search --> : How can client run ..?


saimukesh
July 27th, 2006, 03:09 AM
Hi,
In my website,after clicking button i am able to run batch file by using system.diagnostics.process.start("file.bat") at server,it is running amazingly.But my problem is, the client is unable to run batch file by clicking same button.what might be the problem? and also i want to know whether by sitting at server can we create a new file at client machine..?


Please reply me as soon as possible....i will be thankful to them ...

mcmcom
July 28th, 2006, 02:27 PM
i think the program is looking for the batch file on the clients machine. I BELIEVE (but not totally sure, someone validate this) that the System.Diagnostics.Process.Start only looks on the LOCAL machine where its being run. That being said, if you put this in a website and a client clicks the link it will look on hte CLIENTS IO Structure to find the "file.bat" while its really on the SERVERS IO. So you need to call it a different way so the server knows that it should look on the server.

hth,
mcm

saimukesh
July 29th, 2006, 12:29 AM
HI,Huh Thanks yaar,atleast someone cared me.I am happy for that.But to be frank i am sill at user level.So i dont know how to call it a different way so the server knows that it should look on the server. Please help me....

Shuja Ali
July 29th, 2006, 07:20 AM
AFAIK, using Process.Start will start the process on the server side and not on the client side. What does this batch file do. Probably you can write a client side javascript to do that same thing.

saimukesh
July 31st, 2006, 01:38 AM
Hi Ali, thanks for caring me.The problem is

Suppose client is not having particular s/w so he will click the button then that file will be run at the server side...this is what i have to do....So all the process shld be done at server side end.

Shuja Ali
July 31st, 2006, 01:42 AM
Hi Ali, thanks for caring me.The problem is

Suppose client is not having particular s/w so he will click the button then that file will be run at the server side...this is what i have to do....So all the process shld be done at server side end.
I do not understand this completely. Do you want to install the software on the Client side or the Server Side?

saimukesh
July 31st, 2006, 03:04 AM
Hi Ali,

Yaar,suppose that client is not having some S/w,wich was at server.
So in my project i had a button that will run the .exe files of that particular s/w at the server end.So it was working perfectly when it comes to server .But when it comes to client , when he clicks the same button then the server to be active and shld run the .exe files of that particular s/w..
I Hope u understand now....please help me

Shuja Ali
July 31st, 2006, 04:18 AM
You should let the users download that particular exe to the client and then run it.

saimukesh
July 31st, 2006, 06:13 AM
Hi Ali,As u said if clients downloaded the .exe files from server then what is the use?as there is no s/w loaded in the client side.So how the client can run that particular .exe files? Actually i required all .exe files should run at server.So i am not getting you ,may be i am not upto you so can u please specify more informatively.......

Shuja Ali
July 31st, 2006, 06:17 AM
From what I understand, you are trying to install some software on the client side to have your ASP.NET application work properly.

To achieve this you will need to allow the users download the exe from your server and install it. If that is not the case and you want to run something on the server side then Process.Start is what you will have to use.

saimukesh
July 31st, 2006, 07:23 AM
Hi Ali, the later one is right .But server.process("file.bat") is only working at server.But when it comes to client its not working.See in my project i am having one button,in that buttonclick i had written like

system.diagnostics.process.start("file.bat").So this one will connect to the S/w which was on the sever.So now this was working fine when u sits on the server and running.So when it comes to client after button click the S/w is not activating at the server.This is what i reqires....

Shuja Ali
July 31st, 2006, 07:45 AM
system.diagnostics.process.start("file.bat").So this one will connect to the S/w which was on the sever.So now this was working fine when u sits on the server and running.So when it comes to client after button click the S/w is not activating at the server.This is what i reqires....The process does start on the server side, but you can't see it. If you open the task manager you will see that the process has started and is running.

This seems to be a rights issue. Your ASPNET account should have access to interact with the desktop. If you do a search on MSDN, you will find an article describing how to allow ASPNET user account to interact with desktop.

saimukesh
July 31st, 2006, 08:36 AM
Hi,

but when we are sitting on the serverside and click the button the process is visible to us.Like the cmd prompt is opened and all the thiongs are visible when we are running by sitting on the serverside.But the problem is when we sit at the clientside clicks the button then nothing is visible to us....So why this difference will be.whatever i am executing on server is working nice but when it comes to client the same is not working.Please suggest me as i am still new to Asp.net i cant understand the security things.....I think there is no isssue of
user logins as the server side it is working properly....