Im using VS 2010 MVC3, I set up the web.config to connect to my remote database. When I debug its runs ok, registers, logs in fine. But when I upload it to the host i get this error:
Security Exception Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
MySql.Data.MySqlClient.MySqlConnectionStringBuilder.CreatePermissionSet() +0 MySql.Data.MySqlClient.MySqlConnectionStringBuilder.DemandPermissions() +38 MySql.Data.MySqlClient.MySqlConnection.PermissionDemand() +94 MySql.Data.MySqlClient.MySqlConnection.Open() +196
MySql.Web.Common.SchemaManager.GetSchemaVersion(String connectionString) +65
MySql.Web.Common.SchemaManager.CheckSchema(String connectionString, NameValueCollection config) +39
MySql.Web.Security.MySQLRoleProvider.Initialize(String name, NameValueCollection config) +462
System.Web.Configuration.ProvidersHelper.InstantiateProvider(ProviderSettings providerSettings, Type providerType) +419
Im using MySQL Connector Net 6.5.4