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

J

Jake

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
 
P

Paul Glavich [MVP - ASP.NET]

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 said:
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?
 

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,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top