Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Web Service: Uploading files and setting file security on a file server

Thread Tools

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

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


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

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

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

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

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?
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
ftp uploading vs. control panel uploading Dung Ping HTML 10 01-16-2006 10:43 AM
Uploading files to Web server FusionGuy ASP .Net 2 10-17-2005 01:16 PM
Problem uploading files to Web server FusionGuy ASP .Net 0 10-12-2005 06:33 PM
Uploading files web service with NTFS security wym ASP .Net 0 04-23-2004 03:31 PM
Uploading files to the web server Jason ASP .Net 2 01-20-2004 02:28 PM