Having an ASP.Net server write a flie to another server

Discussion in 'ASP .Net Security' started by Jake, May 5, 2004.

  1. Jake

    Jake Guest

    Hi all

    I am trying to have my ASP.Net server write a file onto another server. I continue to have security issues when attempting to do this. Ideally what I would like to achieve is to have the specific code within the function run under a specific account that has access to the other server. Or will I have to allocate the permissions to the actual ASP.Net process, which i can see will have other security implications. Any ideas

    Thanks in advance

    Cheers Jake
    Jake, May 5, 2004
    #1
    1. Advertising

  2. You could use the DPAPI to store a specific users credentials on the machine
    somewhere (config file, registry etc.) in encrypted format, and when you
    want to write the file, simply impersonate that user in code, write the
    file, then undo the impersonation. The link below has a sample of how to
    impersonate a user, then undo that impersonation.

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
    frlrfSystemSecurityPrincipalWindowsImpersonationContextClassTopic.asp

    Also, below is a link to a DPAPI library I have written that contains full
    source code and is ready to use from .Net. (ie. all the calls to unmanaged
    code are already done for you)

    http://authors.aspalliance.com/glav/downloads/dpapi_wrapper.zip

    --
    - Paul Glavich
    Microsoft MVP - ASP.NET


    "Jake" <> wrote in message
    news:...
    > Hi all,
    >
    > I am trying to have my ASP.Net server write a file onto another server. I

    continue to have security issues when attempting to do this. Ideally what I
    would like to achieve is to have the specific code within the function run
    under a specific account that has access to the other server. Or will I
    have to allocate the permissions to the actual ASP.Net process, which i can
    see will have other security implications. Any ideas?
    >
    > Thanks in advance.
    >
    > Cheers Jake
    Paul Glavich [MVP - ASP.NET], May 5, 2004
    #2
    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. Priya
    Replies:
    0
    Views:
    329
    Priya
    Nov 25, 2003
  2. Ding
    Replies:
    1
    Views:
    517
    Andrew Thompson
    Jul 1, 2004
  3. Replies:
    15
    Views:
    1,100
    Keith Thompson
    Mar 14, 2006
  4. fniles
    Replies:
    6
    Views:
    651
    Karl E. Peterson
    Apr 27, 2009
  5. Dean Karres

    Daemons and flie locking

    Dean Karres, May 5, 2010, in forum: Perl Misc
    Replies:
    4
    Views:
    160
    Xho Jingleheimerschmidt
    May 6, 2010
Loading...

Share This Page