Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pipe Security
Message
De
03/01/2009 16:23:22
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Securité
Titre:
Pipe Security
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01370852
Message ID:
01370852
Vues:
163
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?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform