Solved

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

Posted on 2012-04-05
4
325 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

778 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