Solved

How to set up a remote upload directory on a remote server for IIS

Posted on 2010-08-21
4
694 Views
Last Modified: 2012-05-10
I am writing an ASP.NET application using C#.
This website will allow users to upload images.
The application will automatically place the uploaded image into a directory, based on the current year.

So for example, let's say the "root" directory is called "user_images"
The first time a user uploads a file for the year 2010, the application will automatically create a directory named "2010"

So the actual path to the 2010 directory is "C:\user_images\2010"
This application works fine on my local computer  ;-)

Now I am ready to publish this web application to my web hosting company's web server.
They have Windows 2008 Servers running IIS and I can configure IIS using their admin control panel.

1.
I know how to publish my actual web application to their web server.
But how do I create my "user_images" directory on their remote server?

2.
I can't imagine they would give me access to the root of their server, so do I make a virtual directory in IIS called "user_images"?

3.
If that's how it's done, then how do I modify my web.config file to point to this virtual directory? (right now the "user_images" directory is hard-coded in my web.config file as "C:\user_images\" ... I assume this won't work on the virtual server)

4.
How do I configure permissions on that remote directory so that my web application has full control inside of that directory? (create additional directories, read images, delete images, move images, rename images)

5.
Finally, I assume that it is best practice to NOT place my user upload directory ("user_images") inside of my web application's virtual directory, because each time I publish the website from Visual Studio, it warns me that it will delete all existing files before republishing. (If my user uploaded a bunch of images and then I made a change to the website and republished it, I'm thinking all of my user's images would be deleted)

Thank you!
0
Comment
Question by:ecarbone
4 Comments
 
LVL 10

Accepted Solution

by:
Jini Jose earned 500 total points
ID: 33494110
you will get permission to create directory in the webserver. you can ask for that.


instead of creating webproject, please create web application. then you only need to upload the modified files.
0
 
LVL 6

Expert Comment

by:aymoon80
ID: 33494470
0
 
LVL 10

Author Closing Comment

by:ecarbone
ID: 33682115
you were correct! I didnt think a web hosting company would give me access to a specific path on a shared server, but they did and my app works perfectly.

thank you!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

919 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now