code-access-security

“dynamic operations can only be performed in homogenous appdomain” error while launching PowerShell

倾然丶 夕夏残阳落幕 提交于 2019-11-30 16:41:14
问题 I have a powershell script that I am trying to execute from WCF REST service.I am using the System.Management.Automation and System.Management.Automation.Runspaces assemblies. The C# code looks like this: Command command = new Command(path); command.Parameters.Add(param); RunspaceConfiguration runspaceConfiguration = RunspaceConfiguration.Create(); using (Runspace runspace = RunspaceFactory.CreateRunspace(runspaceConfiguration)) { runspace.Open(); ... other code } This error happens here once

CLR Strict Security on SQL Server 2017

拜拜、爱过 提交于 2019-11-30 06:46:49
MSDN on this article says: CLR uses Code Access Security (CAS) in the .NET Framework, which is no longer supported as a security boundary. A CLR assembly created with PERMISSION_SET = SAFE may be able to access external system resources, call unmanaged code, and acquire sysadmin privileges. Beginning with SQL Server 2017, an sp_configure option called clr strict security is introduced to enhance the security of CLR assemblies. clr strict security is enabled by default, and treats SAFE and EXTERNAL_ACCESS assemblies as if they were marked UNSAFE. The clr strict security option can be disabled

what does this security warning mean (.Net Process class)?

点点圈 提交于 2019-11-30 04:59:44
问题 I am using VSTS 2008 + .Net 2.0 + C#. And I am running Code Analysis after build. I got the following confusing security warning. Here is the warning and related code, any ideas what is wrong? If there is security warning, how to fix it? System.Diagnostics.Process myProcess = new System.Diagnostics.Process(); myProcess.StartInfo.FileName = "IExplore.exe"; myProcess.StartInfo.Arguments = @"default.html"; myProcess.StartInfo.Verb = "runas"; myProcess.Start(); warning : CA2122 : Microsoft

.NET Code Access Security: Useful or just overcomplicated?

跟風遠走 提交于 2019-11-30 01:13:47
问题 see also Is “Code Access Security” of any real world use? I want to get some other opinions on this... I like the idea of Code Access Security for desktop applications. But in the lifetime of .NET I have to admit I've never actually had a situation where CAS has actually blocked something to my benefit. I have, however, had many times where something as simple as sharing a quick .NET application across a mapped drive becomes an enterprise code access nightmare. Having to break out caspol.exe

CLR Strict Security on SQL Server 2017

混江龙づ霸主 提交于 2019-11-29 06:51:11
问题 MSDN on this article says: CLR uses Code Access Security (CAS) in the .NET Framework, which is no longer supported as a security boundary. A CLR assembly created with PERMISSION_SET = SAFE may be able to access external system resources, call unmanaged code, and acquire sysadmin privileges. Beginning with SQL Server 2017, an sp_configure option called clr strict security is introduced to enhance the security of CLR assemblies. clr strict security is enabled by default, and treats SAFE and

GIT support for branch based user authorization - Best Practices or Tools?

大兔子大兔子 提交于 2019-11-28 07:02:21
For a product based GIT repository, wherein there are branches for maintenance, testing as well as future development, how do I control user access to these branches. By access, I mean that even though others may read from it, they should not be able to inadvertently push changes to the repo. For example, A - B - C - D - E - F -> master | | | V1 V2' exp | V2 "B" is the commit used for Branch with tag V1 - meant for released version of the product. Only support/maintenance engineers should have access to this. C is used for a recently frozen pre-release product V2' and should only allow

Disabling certificate revocation checking for an application on Windows

放肆的年华 提交于 2019-11-27 14:35:32
问题 I have a .NET 3.5 desktop application that had been showing periodic slow downs in functionality whenever the test machine it was on was out of the office. I managed to replicate the error on a machine in the office without an internet connection, but it was only when i used ANTS performance profiler that i got a clearer picture of what was going on. In ANTS I saw a "Waiting for synchronization" taking up to 16 seconds that corresponded to the delay I could see in the application when

Is “Code Access Security” of any real world use?

跟風遠走 提交于 2019-11-27 10:46:48
Warning: Newer versions of .Net and .Net core has have removed and/or changed “Code Access Security” (CAS) since this question was asked. Original Question: I am in the process of studying for the 70-536 .NET Framework - Application Development Foundation Exam , as I have been programming .net for many years, this should not be hard! However I am having to learn about “Code Access Security” (CAS), As I have never had a need to use or configure it, I was wondering if anyone else has found a real life usage for it? Please provide examples of when you have used CAS and it has been part of the

Looking for a practical approach to sandboxing .NET plugins

和自甴很熟 提交于 2019-11-27 05:52:41
I am looking for a simple and secure way to access plugins from a .NET application. Although I imagine that this is a very common requirement, I am struggling to find anything that meets all my needs: The host application will discover and load its plugin assemblies at runtime Plugins will be created by unknown 3rd parties, so they must be sandboxed to prevent them from executing malicious code A common interop assembly will contain types that are referenced by both the host and its plugins Each plugin assembly will contain one or more classes that implement a common plugin interface When

GIT support for branch based user authorization - Best Practices or Tools?

我与影子孤独终老i 提交于 2019-11-27 01:46:03
问题 For a product based GIT repository, wherein there are branches for maintenance, testing as well as future development, how do I control user access to these branches. By access, I mean that even though others may read from it, they should not be able to inadvertently push changes to the repo. For example, A - B - C - D - E - F -> master | | | V1 V2' exp | V2 "B" is the commit used for Branch with tag V1 - meant for released version of the product. Only support/maintenance engineers should