cancel
Showing results for 
Search instead for 
Did you mean: 
Go to solution

Window hosting - need to support to install MySql.Data.MySqlClient

Hello GoDdady Support Team,

 

- I 'm using C# to connect to mysql database on GoDdady hosting.

 

- I have issue when run code with MySql.Data.dll

 

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.

Detail issue:

 

[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
   PortalDB.MySQLDB.GetDataMySql(String myExecuteQuery) +72
   PortalDB.MySQLDB.GetData(String[] columns, String tableName, NameValueCollection dataCondition, NameValueCollection dataConditionLike, String orderBy, Int32 start, Int32 limit) +241
   PortalDB.MySQLItems.getList(NameValueCollection condition, NameValueCollection conditionLike) +48
   PortalDB.PostItems.GetLastItem(String code) +84
   PortalWebApp.Posts.Page_Load(Object sender, EventArgs e) +115
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
   System.Web.UI.Control.OnLoad(EventArgs e) +95
   System.Web.UI.Control.LoadRecursive() +59
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6712
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +245
   System.Web.UI.Page.ProcessRequest() +72
   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +22
   System.Web.UI.Page.ProcessRequest(HttpContext context) +58
   ASP.posts_aspx.ProcessRequest(HttpContext context) +4
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +188
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69

See more information at my site: http://www.gianhadat.com.vn/vi-vn/nha-dat-ban/posts

 

So could you help me to install MySql.Data.dll in to GAC to solve this issue?

 

Regards,

Quyet Nguyen

 

2 REPLIES 2
Highlighted
Solution

Re: Window hosting - need to support to install MySql.Data.MySqlClient

This issue is fixed.

  <system.web>

...

     <trust level="Full" />
  </system.web>

 

Thanks,

Moderator
Moderator

Re: Window hosting - need to support to install MySql.Data.MySqlClient

Hi @matongv. Thank you for taking the time to share your solution. I'm sure other Community members will find this helpful.

^Gary

Gary - GoDaddy | Community Moderator
24/7 Support | Check System Status