windows-security

Get a list of members of a WinNT group (C#)

There are a couple of questions similar to this on stack overflow but not quite the same. I want to open, or create, a local group on a win xp computer and add members to it, domain, local and well known accounts. I also want to check whether a user is already a member so that I don't add the same account twice, and presumably get an e...

ASP.Net unable to see shared folder

I've written a new application in a network I haven't worked in before, and am running into a problem. If I have the following C# code: FileStream fs = File.Create(@"\\MyServer\MyShare\testing.txt"); fs.Close(); In a console application, this code executes correctly. In an ASP.Net application, I receive this error: Logon failure: un...

Windows File security, removing an access rule

I have the following code, that should remove the access of users from a certain folder. Unfortunately it doesn't (the access rule remains in place). No exception is thrown. AuthorizationRuleCollection arc = ds.GetAccessRules(true, true, typeof(NTAccount)); foreach (FileSystemAccessRule ar in arc) { if (ar.IdentityReference is NT...

Do spawned threads automatically run as the identity of the user?

ie static void Main(string[] args) { var thread = new Thread(WhoAmI); thread.Start(); } static void WhoAmI() { //can i access network resources as the user who ran Main? } ...

How to apply Windows group policy using .NET?

Is it possible to apply (and remove) Windows group policy settings using .NET? I am working on an application that needs to temporarily put a machine into a restricted, kiosk-like state. One of the things I need to control is access to USB drives which I believe I can do through group policy. I'd like my app to set the policy when it s...

Sitemap Links don't work on live site, Windows Authentication

I have a intranet site with Windows Authentication. I have 'Administrator' pages in an 'Administrator' folder that will only show for those in the admin group (windows security group) These pages work I have a folder with sub folders containing reports. These permissions are broken down for each type of report. They have similar rol...

Excel VBA macro workbook startup - security warning - automatic update of links disabled

I've created an add-in and installed it, but now when I open Excel I get an error pop-up telling me that the add-in file is a security risk and that automatic updating of links is disabled. I've looked it up and it refers to the Windows DDE protocol, but what does that have to do with this add-in? Does anyone know what's happening behin...

How to run a process as current user privilege from an admin process

When a setup program(built by like Inno Setup) does launch a process, the process always be run as administrator privilege. -because setup program had been run as admin. I want to run the child process as current user's privilege. Is there a good way? ...