Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Two different visual studio versions 3 23
VB.Net How to Exit Sub - Exit Form??? 5 51
Server Error 11 47
How useful is the free version of Selenium? 3 16
Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

862 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now