View/modify ASPNET rights.

A

Alex

Hello, All

I am trying to open named pipe from ASP.NET. As I have found it is not
possible due to the ASPNET account restrictions. Just wonder if there any
tool that can show me what rights ASPNET account has? Can I grant ASPNET
account rights to open named pipe or better certain pipe (the application
created pipe is under my control)?

Some links or advices whoule be very helpfull.

Thanks in advace!

- Alex.
 
A

Alex

Answering my question...

Description of ASPNET account rights can be found here
http://support.microsoft.com/kb/317012/

I have found 2 ways to allow ASP.NET application to read/write named pipe.
1) By means of ASP.NET impersonation (refer to
http://support.microsoft.com/kb/317012/)
2) Adjust DACL of the created named pipe to grant rights for ASPNET
account. It is possible as the pipe is under my control.

//
// Sample code: create named pipe object that allow everybody to read/write
it.
//
SECURITY_ATTRIBUTES saPipeSecurity;
PSECURITY_DESCRIPTOR pPipeSD = NULL; /* GRANT RIGHTS TO EVERY BODY. */

saPipeSecurity.nLength = sizeof ( SECURITY_ATTRIBUTES);
saPipeSecurity.bInheritHandle = TRUE;
saPipeSecurity.lpSecurityDescriptor = pPipeSD;

HANDLE hPipe = CreateNamedPipe(..., & saPipeSecurity);

- Alex.
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top