?
Solved

Select a file and get the file path without uploading

Posted on 2014-11-05
1
Medium Priority
?
190 Views
Last Modified: 2014-11-06
Hi,

I would like to be able to just browse and choose a file from my computer and get the file and path into that selection. I don't want to upload it, I just want the user to be able to choose the file from his/her system so that I can get hold of the path and file in code behind. In that way I can move the file internally on the network.

I can't use an upload control for security reasons (it will only give me the file name) so I winder if anyone has some insight on another way to do this.

Thanks for help!

Peter
0
Comment
Question by:peternordberg
[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
1 Comment
 
LVL 35

Accepted Solution

by:
ste5an earned 2000 total points
ID: 40425744
As it's ASP.NET, you want that the user browses for a file in the browser. Then sends the path to your server. Now you(?) - maybe you mean the ASP.NET application - should move the file?

If your answers are yes, then my answer is: this is not possible.

For two reasons:

The path transmitted to your server is the path as seen by the client. Even worse, it may be a local mapped path. Imho there is no way to use a Windows API function like WNetGetUniversalName (advapi32) in the browser. And you cannot rely on normal netlogon scripts to get the mappings right, this is only possible in a highly restriced and controlled environment.

The user has under most circumstances different permissions than your ASP pool thread. So you cannot access the files from your application.

Especially the permission problem should make you rethink what you're trying to do. Maybe you can give us a little bit more context.
0

Featured Post

Docker-Compose to Simplify Multi-Container Builds

Our veteran DevOps Author takes you through how to build a multi-container environment, managed with a single utility in order to simplify your deployments.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

752 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