title: 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed
body: <p>I deployed my ASP.NET project on host but take this fail. I am trying to solve this issue for hours but could not.
  On my first page users enter email and password after click login button they navigate menu. All datas store in mysql db. After publish i could not see mysqldata.dll in bin folder so i have added manually.</p>
  
  <p>Please help me to solve this issue. I should deploy in 2 days.</p>
  
  <p>This issue is displaying after while i am trying to login.</p>
  
  <pre><code>Server Error in '/' Application.
  
  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: 
  
  
  [No relevant source lines]
  
  Source File: App_Web_0twfxhxf.8.cs    Line: 0 
  
  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.MySqlConnection.AssertPermissions() +0
     MySql.Data.MySqlClient.MySqlConnection.Open() +190
     gop.Default.loginbutton_Click(Object sender, EventArgs e) +216
     System.EventHandler.Invoke(Object sender, EventArgs e) +0
     System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9628722
     System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +103
     System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
     System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
     System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35
     System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6704
     System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +245
     System.Web.UI.Page.ProcessRequest() +72
     System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
     System.Web.UI.Page.ProcessRequest(HttpContext context) +58
     ASP.default_aspx.ProcessRequest(HttpContext context) in App_Web_0twfxhxf.8.cs:0
     System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +341
     System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +69
  </code></pre>
  
  <p>This is web.config file;</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  
  &lt;configuration&gt;
    &lt;appSettings&gt;
  
      &lt;add key="ValidationSettings:UnobtrusiveValidationMode" value="None" /&gt;
  
      &lt;add key="webpages:Version" value="2.0.0.0"/&gt;
    &lt;/appSettings&gt;
  
    &lt;connectionStrings&gt;
      &lt;add name="MySqlConnectionString" connectionString="Server=xxx;Database=xxx;Uid=xxx;Pwd=xxx;charset=utf8;Integrated Security=false"
     providerName="MySql.Data.MySqlClient" /&gt;
    &lt;/connectionStrings&gt;
  
    &lt;system.web&gt;
  
      &lt;customErrors mode="Off" /&gt;
      &lt;compilation targetFramework="4.0" debug="true"/&gt;
      &lt;httpRuntime targetFramework="4.0" /&gt;
  
    &lt;/system.web&gt;
  
  &lt;/configuration&gt;
  </code></pre>
  
  <p>I have tried to add <code>&lt;trust level="Medium" /&gt;</code> in web.config file but after that even first page can not display and give down issue.</p>
  
  <pre><code>Server Error in '/' Application.
  
  Configuration Error
  
  Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 
  
  Parser Error Message: This configuration section cannot be used at this path.  This happens when the site administrator has locked access to this section using &lt;location allowOverride="false"&gt; from an inherited configuration file.
  
  Source Error: 
  
  
  An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
  
  Source File: D:\inetpub\xxx.com\www\web.config    Line: 24 
  </code></pre>