Click here to Skip to main content
15,895,283 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how check if "network service" Group is has permission to write in Folder and if not how to give it the permission in vb.net (the user is the admin) ?
Posted
Updated 13-Jan-14 20:57pm
v2

1 solution

Try writing a small file to the folder. If it doesn't have permissions, it'll fail. Catch the exception.

As for getting those permissions, code cannot get more permissions than the user already has, so there's really no way to do this in code. The only way to do that would be if an administrator of the folder in question granted those permissions.
 
Share this answer
 
Comments
Ahmad Al Halabi 13-Jan-14 13:07pm    
the user is the admin, can i in this condition grant to the "Network service" Group permission to write in folder (in vb.net) ? or the only solution is to do that manually ( in property of the folder) ?
Dave Kreskowiak 13-Jan-14 14:37pm    
You didn't mention that part.

You do it like this[^].
Ahmad Al Halabi 14-Jan-14 2:57am    
it's works 10x

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900