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. Advertisements

  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. Advertisements

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. Matthew Louden
    Replies:
    4
    Views:
    3,356
    Fahad Al Hadhrami
    Nov 24, 2003
  2. Priya
    Replies:
    0
    Views:
    443
    Priya
    Nov 25, 2003
  3. David Virgil Hobbs
    Replies:
    0
    Views:
    686
    David Virgil Hobbs
    Jan 6, 2004
  4. \A_Michigan_User\

    Write ASP.NET 1.1 code with VB.net or VS.net ?

    \A_Michigan_User\, Aug 15, 2005, in forum: ASP .Net
    Replies:
    7
    Views:
    1,972
    Saber
    Aug 16, 2005
  5. Ameen
    Replies:
    3
    Views:
    3,621
    Ameen
    Oct 18, 2005
  6. Ding
    Replies:
    1
    Views:
    631
    Andrew Thompson
    Jul 1, 2004
  7. fniles
    Replies:
    6
    Views:
    889
    Karl E. Peterson
    Apr 27, 2009
  8. Dean Karres

    Daemons and flie locking

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