You can use the Caspol.exe utility to add a publisher condition to the ALL_CODE group at the enterprise level, and then import the company's certificate into the condition. This will allow you to prevent users from running unauthorized .NET applications.
By using the Caspol utility and setting the Exclusive attribute on the default setting, you can ensure that no other settings that are greater than your settings can be granted.
Caspol can be used to set the permissions on a specific assembly when you receive messages that a user does not have the permissions to run an assembly.
You can control the availability of controls on a form by using the following code and using Windows NT security groups.
MyForm M = new MyForm();
WindowsIdentity Me = WindowsIdentity.GetCurrent();
WindowsPrincipal Principal = new WindowsPrincipal(Me);
if(Principal.IsInRole("DomainName\GroupName"))
{
M.ShowAdvancedFeatures();
}
M.Show();
To require an application to use a specific version of an assembly, you should modify the Application.exe.config file. The requiredRuntime node can be used to set a specific version of the assembly required to run.
One route to troubleshoot a TypeLoadException is to make sure the assembly is in the same folder as the EXE, install the assembly into the GAC, and then use the following:
<probing privatePath="Path" />
You can call methods of a Web Service asynchronously using WSDL by calling BeginMethodName and EndMethodName.
If you install a new version of an assembly and you discover that the older version of the assembly is always being used, it is most likely because the assembly is being set in the configuration file.
Identity objects represent the user on whose behalf the code is running. If you wish to use a customized identity, you can use a CustomIdentity class.
You can assure people that software comes from a specific developer or company by using the Signcode.exe tool to digitally sign an assembly.