升级程序DataTable.ReadXml报错:MySql.Data.Types.MySqlDateTime is not allowed here
作者:C/S框架网|www.cscode.ne  发布日期:2021-06-11 11:39:55
  升级程序DataTable.ReadXml报错:MySql.Data.Types.MySqlDateTime is not allowed here

升级程序DataTable.ReadXml报错:MySql.Data.Types.MySqlDateTime is not allowed here



错误信息:

{"Type 'MySql.Data.Types.MySqlDateTime, MySql.Data, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' is not allowed here. 



解决方案:



贴图图片-自动升级1




XML Code:

<allowedTypes>
<!-- <add type="assembly qualified type name" /> -->
<add type="MySql.Data.Types.MySqlDateTime, MySql.Data, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
<!-- additional <add /> elements as needed -->
</allowedTypes>

//来源:C/S框架网 | www.csframework.com | QQ:23404761



App.config文件:


XML Code:

<?xml version="1.0" encoding="utf-8"?>

<configuration>

<configSections>
<sectionGroup name="system.data.dataset.serialization" type="System.Data.SerializationSettingsSectionGroup, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="allowedTypes" type="System.Data.AllowedTypesSectionHandler, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
</sectionGroup>
</configSections>

<system.data.dataset.serialization>
<allowedTypes>
<!-- <add type="assembly qualified type name" /> -->
<add type="MySql.Data.Types.MySqlDateTime, MySql.Data, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
<!-- additional <add /> elements as needed -->
</allowedTypes>
</system.data.dataset.serialization>

</configuration>


//来源:C/S框架网 | www.csframework.com | QQ:23404761





C/S框架网|原创精神.创造价值.打造精品

扫一扫加微信
C/S框架网作者微信 C/S框架网|原创作品.质量保障.竭诚为您服务


上一篇 下一篇