The System.SecurityException error occurs when a SocketTools .NET component is used with an ASP.NET application, displaying the error message: The application attempted to perform an operation not allowed by the security policy.
This error indicates that the server is not configured for full trust. The SocketTools .NET components require unrestricted access to specific system resources such as the networking subsystem and system registry. To grant full trust to your ASP.NET application, you need to modify the web.config file to include the following:
<trust level="Full" originUrl=".*"/>
Note that setting the code access security level to full trust enables the application to call native code, access system services, open database connections and access the registry and modify files outside of the server’s virtual directory.