Virtual Directory cannot Write file

I am using and have created an aspx application to upload photos.  For the development I just used a sub folder to the application folder on my local machine and everything works fine.  However, once I deploy the application I will need to use a virtual folder to a file server (this does not have installed and is not in any domain) to store the photos due to the overall size.

I have replaced my sub folder with a virtual folder on my local machine and when creating the virtual folder I used admin credencials, but when I now try to create and delete files I catch the following message

Logon failure: unknown user name or bad password.

If I enable directory browsing then I can browse the folders through IE.

I know this is a security thing but don't know how the aspnet account works with virtual folders located on another computer

Thanks in advance
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

a very simple solution to this is to add a single line to the web.config file
if you add the following line

<identity impersonate="true" userName="[domain / machine name]\[username]" password="[password]"/>

that as you may have guessed sets up impersonation. disadvantage is that you have to have the password in plain text, unless someone knows of a way not to.

as you are not concerned with a domain you may have to put the machine name in its place or you may be able simply to exclude it, if you exclude it remove the \ afterwards.

hope that is of some help


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.