Solved

How to get the path of the file on the server.

Posted on 2012-04-05
4
326 Views
Last Modified: 2012-04-05
I have an application, when it gets opened, it open a url in the server. From the server, the application has a file which any user can download locally into machine.

How to read/get the physical path of the client machine where the file is stored.
0
Comment
Question by:searchsanjaysharma
  • 2
  • 2
4 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 37813079
If you understand why this is a security risk, then you will understand why it's not possible  = )
0
 

Author Comment

by:searchsanjaysharma
ID: 37813174
Or shall i redefine the question.I have a file a.htm the user has to download once, to access my application on the server.
So when the user click on a.htm, i need to know the physical path of the a.htm.

or

a.htm contains a function f(), called at onload which redirects to www.google.com, how do i get the path of a.htm on server.
0
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 37813203
I believe you'll need to look into local storage and HTML5. I don't know enough about either to confirm, but it may suit your need.

However, think about it like this:  Let's say I'm a malicious web page developer. I craft a page which targets a known vulnerable program on the file system. (This happens all the time with web pages attacking Flash and other plugins.) I can tell what OS you are running because your browser happens to be one of the many that submits OS details to the server. Because I know what OS you are running, I also know about some common exploits for your particular system. If I had access to your local filesystem, the I could work my page in such a way that I attacked that known vulnerability and compromised your system. This is why web pages don't interact with a client's filesystem.

With HTML5, my understanding is that local storage is like a sandbox area where you can store files. Javascript can access this area. You can probably save your file here and load it via Javascript. Of course, since this HTML5, you will be limited to the newer browser versions that are out (say goodbye to IE 6!!).
0
 

Author Closing Comment

by:searchsanjaysharma
ID: 37813705
ok
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question