views:

35

answers:

0

Hi,

On a webserver (shared hosting provider) I published a website with a ADO.Net Framework model in use with MySql Connector 6.3.1. When I request a page, a Security Exception will be happen with this error messages:

"LinkDemand The type of the first permission that failed was: System.Security.Permissions.SecurityPermission The Zone of the assembly that failed was: MyComputer ".

This exception raised when code collect the listeners of a tracksource:

public class MySqlTrace
{
  private static TraceSource source = new TraceSource("mysql");
  static MySqlTrace()
  {
    foreach (TraceListener listener in source.Listeners) // <-- Exception throw here
    {    // ... }
  }
}

The web.config doesn't have any trace data or system.diagnostics.

My question is, why will a get a LinkDemand security exception during collecting the source listeners. What can maybe be wrong in here?