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

Discussion in 'ASP .Net Web Services' started by wym, Apr 26, 2004.

  1. wym

    wym Guest

    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?
    wym, Apr 26, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jason

    Uploading files to the web server

    Jason, Jan 20, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    351
    Jason
    Jan 20, 2004
  2. wym
    Replies:
    0
    Views:
    406
  3. Dung Ping
    Replies:
    10
    Views:
    974
    Chaddy2222
    Jan 16, 2006
  4. Greg
    Replies:
    0
    Views:
    107
  5. Greg
    Replies:
    0
    Views:
    110
Loading...

Share This Page