Web Service: Uploading files and setting file security on a file server

W

wym

I have written a web service that provides the following methods:

UploadFile
SetNTFSSecurity

Their purpose is to allow a user to Upload a file to a shared remote
folder (UNC path) which has "Everyone" as permission and using
SetNTFSSecurity to allow for tighter security on the files (remove the
propagated "Everyone" from parent folder and add specific users to the
ACL).

My problem is putting it all together...

Problem 1:

In my aspx page, I would like to allow the user to upload entire
folders and for each file in folder, use the UploadFile service.
Currently, I'm using an html input button of type file, which only
allows you to choose ONE file at a time.

<INPUT id=uploadedFile type=file size=31 name=uploadedFile
runat="server">

After the file is chosen, I add it to a listbox. The user will keep
on adding to the listbox waiting for the files to be uploaded.
Finally, there is a server side button which will call the UploadFile
web service for each file in the listbox. Obviously, this is
extremely tedious for the user and I'd like to simplify things by just
allowing the user to choose an entire folder and then recurse my way
through it to feed each file to my web function. BTW, the UploadFile
service was written based on
http://www.dotnetextreme.com/code/binaryupload.asp

I'm willing to look at third party controls if the solution is too
complicated.

Problem 2:

After I have uploaded the files to a file server, I'd like to set
security on them. I'm using ADSI's ADsSecurity.dll to set security.
In my machine.config, I have set the process to run under my
username/password. I am an administrator on a remote file server but
for some reason, I can't set the security on it. This function was
written based on MS KB 279682's script. I'm able to set the file
security of a remote machine using the script, but not with the web
service? I can however set security rights if the file server and the
web service are on the same machine... Does anyone have any experience
with this?

Again, I'm willing to look at a third party solution.

P.S. While fiddling with the processModel tag's username/password
attributes, I've noticed that I can set them to useless strings
("blah\asdf" and "yackyack"), and it would still work if the file
server and the web service are on the same machine? Huh? How can the
ASP.NET process run under an invalid account that doesn't exist?
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top