Click to See Complete Forum and Search --> : How to retrieve path of client machine.
khushi
June 27th, 2005, 07:04 AM
Hi,
I have an web application on server machine. I want to retrieve the client machine path.
In my application i have used following code for source and destination
string source1 = "c:\\inetpub\\wwwroot\\test\\Result\\";
string destination1 = Server.MapPath(".")+"\\upload\\";
But when i m accessing my application from client machine it is using the server path as source path.
Actually here what i m doing is, uploading files from client machine to server.
So when i m running the above code in server machine, it is working fine. But when i m using the same application from client machine then also it is using the server path as a source path. In my application, server and client machine has the same folder result.
I don't know where i am going wron.
Plz help me!!!!!
Pinky98
June 27th, 2005, 08:15 AM
Sorry?? I don't understand what you are trying to do?
You have this app. And it is running on which machine the server or the client or both?
And is do "source and destination" refer to the "local and remote" machines or to "server and client".
exterminator
June 27th, 2005, 11:56 AM
This link would be useful. Try it out.
http://www.4guysfromrolla.com/webtech/091201-1.shtml
Cheers,
Exterminator
khushi
June 28th, 2005, 12:54 AM
Hi
Here i m using server and client concept. Here i want to do is to retreive path of clients machine on a click of button.
exterminator
June 28th, 2005, 01:34 AM
Yes..right.. but did you go through the link I gave in my earlier post. That would answer all your queries.
Try it out atleast.
Cheers,
Exterminator.
khushi
June 28th, 2005, 02:05 AM
Hi,
I don't want to use html control. I have a static path. What exactly i want is, I have a folder "UPLOAD" in all client machines. So whenever any client click on a upload button all files get upload to his machine from server. So to recognise which users is executing the application i need to retrieve the path.
Here my problem is not of uploading. That part is working fine. Only i want how to trap which is user is executing the application. so the file get uploaded to his folder.
talksandy
June 28th, 2005, 05:23 AM
You are uploading to server from client or from server to client ???
khushi
June 28th, 2005, 05:50 AM
Hi,
I m uploading from server to client.
exterminator
June 28th, 2005, 06:24 AM
So better call it downloading from server to the client machine. I got all confused with the terminologies that you used.
Now that doesnt matter. From the file path you cannot find out which user is trying to access the server for the download process. You must be having some login mechanism for various clients for your web-application. You can get the user details making a request to your page using the User property of the Page Class. See documentation.
Cheers,
Exterminator
talksandy
June 28th, 2005, 11:58 PM
If user means IP/Servername then u can get it easily otherwise you can do some Windows Authentication or your own authorization system as suggested by exterminator (http://www.codeguru.com/forum/member.php?u=154995)
:thumbd:
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.