升级程序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.
App.config文件:
扫一扫加微信
错误信息:
解决方案:
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
<!-- <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:
<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
<?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
扫一扫加微信
版权声明:本文为开发框架文库发布内容,转载请附上原文出处连接
NewDoc C/S框架网