Solved

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

Posted on 2014-04-15
2
270 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 265 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

What is an ISAPI filter?   •      It's an assembly (.dll file) that can add or change the way IIS works.   •      They can be enabled globally for your web server or on a site-by-site basis.   When the IIS server receives a request, enabling the ISAPI fi…
Lync server 2013 or Skype for business Backup Service Error ID 4049 – After File Share Migration
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

730 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