Solved

Select a file and get the file path without uploading

Posted on 2014-11-05
1
186 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 34

Accepted Solution

by:
ste5an earned 500 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

Get Actionable Data from Your Monitoring Solution

Your communication platform is only as good as the relevance of the information you send. Ensure your alerts get to the right people every time with actionable responses. Create escalation rules that ensure everyone follows the process and nothing is left to chance.

Question has a verified solution.

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

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
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.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

718 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