How can I run an exe or windows service in medium trust?
问题 I would like to run exes and Windows Services in Medium Trust, but all the literature I can find suggests using <system.web> <trust level="Medium"/> </system.web> for ASP.NET, so I have tried that but using code from How do you check if you are running in Medium Trust environment in .NET? it still appears to have full trust. What is the correct way to do this? 回答1: The available approaches depend on the .NET version. Prior to .NET 4.0, the CLR enforced CAS policy, which made it possible to