writing to a unc share

G

Guest

This is a duplicate thread I started in aspnet.security. I wasn't sure which
is the correct thread for this..

I have a web app that allowes you to upload files to a shared forlder and
also read them off a list of uploaded files.

I created a shared drive on the destination server, and using a mapped
virtual folder to the shared, I can view the files from the shared drive.

My problem is writing the files. We're using the html input control to
uplaod files. We're also using System.IO.FileStream Write method to do the
job. It works until we need to write to the shared drive.

I've looked at various threads and other listings, but can someone add some
code to do this? I'm not sure how to add a credentials object to the write
operation. I've configured my config file to impersonate. I'm also getting
errors wen I add the domain\user and password elements in the config file. If
I were to get it right, won't this impact the other part of my app: reading
files through the virtual folder? Is there some code I can use?

Thanks
 
G

Guest

I had problems to do what you're trying to do when the server was my domain
controller. If the server wasn't, you just have to create the same local
account (user/password) on the IIS machine and the machine you want to save
files to, and use this account to impersonate. I agree, this looks like a
hack, but it worked for me, except when the IIS machine was the domain
controller.

Hope this helps

François
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top