System.SecurityException Error Using ASP.NET

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.

More Information

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:

<location allowOverride="true">
    <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.

See Also

ASP.NET Trust Levels and Policy Files

Shopping Cart
Scroll to Top