Solved

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

Posted on 2012-04-05
4
327 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

734 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