Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to use a folder for Uploading files in it in Asp.net

Posted on 2014-04-15
2
Medium Priority
?
274 Views
Last Modified: 2014-04-16
I have a asp.net site, in it user can uploads files of any sizes. It may include image, documents etc.

Now it is hosted in ISS and I need to a folder which is on D drive "D:\Upload" to store all the files which user uploads.

I have used relative path in my code already.

I need to know is there any way by which I can do some mapping to this folder "D:\Upload"
So that my uploaded files go there instead of my site folder which is  different location and mapped in ISS site.
0
Comment
Question by:yadavdep
[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 Comments
 
LVL 22

Expert Comment

by:Mrunal
ID: 40003336
Hi,
you can use physical path, as it is not dependent on your application and application hosting server.

After uploading functionality done, you can raise a request to server to read files from the same location and confirm (alternative solution).

Better way you can keep this path in configuration file and read from there, so that later on you can change it without compiling your application.

Hope this helps you.
0
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 1060 total points
ID: 40003421
The correct way to go about it would be to add a "virtual directory" to your site that maps to the folder on the D: drive.

That way you access it as if it was a relative folder in your site, but it will physically map elsewhere.

Guide to creating VDirs: http://technet.microsoft.com/en-us/library/cc771804(v=ws.10).aspx
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

618 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