Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pipe Security
Message
From
03/01/2009 16:23:22
 
 
To
All
General information
Forum:
ASP.NET
Category:
Security
Title:
Pipe Security
Environment versions
Environment:
C# 3.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01370852
Message ID:
01370852
Views:
161
I have a pipe server on a client machine, and a service running as a "NETWORK SERVICE" on a server. When the service on the server tries to connect to the pipe on the client I get "Access to the path is denied."

Everything works fine if I run the service as an Administrator.

I'm trying to give the "NETWORK SERVICE" access on the client like this:
pipe = new NamedPipeServerStream(_PipeName,   
                                 PipeDirection.InOut,   
                                 NamedPipeServerStream.MaxAllowedServerInstances,   
                                 PipeTransmissionMode.Message,   
                                 PipeOptions.None);   
PipeAuditRule auditRule = new PipeAuditRule(@"NETWORK SERVICE",   
                                            PipeAccessRights.FullControl,   
                                            AuditFlags.Failure);   
PipeAccessRule accessRule = new PipeAccessRule(@"NETWORK SERVICE",   
                                               PipeAccessRights.FullControl,   
                                               AccessControlType.Allow);    
PipeSecurity security = pipe.GetAccessControl();    
security.AddAuditRule(auditRule);    
security.AddAccessRule(accessRule);    
pipe.SetAccessControl(security);  
The pipe.SetAccessControl(security) fails with System.UnauthorizedAccessException

Any idea how to fix this?
Next
Reply
Map
View

Click here to load this message in the networking platform