如何解决带devart dotConnect for Oracle的RestService丢失了许可证信息
我们有一个使用Devart dotConnect for Oracle(版本9.6.646.0。)的Rest Service(Asp.net MVC.net 4.7.1 / Asp.net Core)。
这里出现一个奇怪的现象:经过一段时间的正常运行(可能是半小时后直到几个小时),使用数据库访问的服务引发了devart许可异常(未找到许可)
重新发布相同的资源后,一切运行良好-再次运行了一段时间。对于.net 4.7.1和.net Core Services,这种现象是相同的。
在IIS中重新启动站点或重新启动IIS并没有帮助。
我们已将许可证信息嵌入到licenses.config和licenses.lixc文件中
Licenses.licx:
Devart.Data.Oracle.OracleConnection,Devart.Data.Oracle,Version = 9.6.646.0,Culture = neutral,PublicKeyToken = 09af7300eec23701
Licenses.config:
KVSH.KVRest.ERP.WebApi.WebHost
服务器:Windows Server 2012 R2(未安装devart dotConnect)
IIS :版本8.5.9600
有人有主意吗?
这是一个例外:
System.Data.Entity.Core.ProviderIncompatibleException: An error occurred accessing the database.
This usually means that the connection to the database failed. Check that the connection string
is correct and that the appropriate DbContext constructor is being used to specify it or find it
in the application's config file. See http://go.microsoft.com/fwlink/?LinkId=386386 for
information on DbContext and connections. See the inner exception for details of the failure.
---> System.Data.Entity.Core.ProviderIncompatibleException: The provider did not return a ProviderManifestToken string.
---> Devart.Data.Oracle.OracleException: License not found. Please view "Licensing" topic
in dotConnect for Oracle documentation for details or contact Devart technical support.
bei Devart.Data.Oracle.OracleConnection.Open()
bei Devart.Data.Oracle.Entity.ap.a(DbConnection A_0,OracleServerType& A_1,Nullable`1& A_2)
bei Devart.Data.Oracle.Entity.ap.b(DbConnection A_0)
bei Devart.Data.Oracle.Entity.OracleEntityProviderServices.GetDbProviderManifestToken(DbConnection connection)
bei System.Data.Entity.Core.Common.DbProviderServices.GetProviderManifestToken(DbConnection connection)
--- Ende der internen Ausnahmestapelüberwachung ---
bei System.Data.Entity.Core.Common.DbProviderServices.GetProviderManifestToken(DbConnection connection)
bei
System.Data.Entity.Utilities.DbProviderServicesExtensions.GetProviderManifestTokenChecked(DbProviderServices providerServices,DbConnection connection)
--- Ende der internen Ausnahmestapelüberwachung ---
解决方法
.net 4.7.1和.net Core Services的现象相同。
有两组提供程序的程序集,它们具有不同的许可方式:
- .NET Framework-> https://www.devart.com/dotconnect/oracle/docs/?licensing.html
- .NET Standard(.NET Core)-> https://www.devart.com/dotconnect/oracle/docs/?licensingstandard.html
不应有相同的错误。
IIS:版本8.5.9600 Licenses.config: KVSH.KVRest.ERP.WebApi.WebHost
请将w3wp.exe添加到您的Licenses.config中,因为这是IIS进程的名称。
我们无法在环境中重现该错误。如果在生产中升级到v9.11.1064无法解决问题,请通过https://www.devart.com/company/contactform.html向我们提供以下信息:
a)检查生产中Windows和IIS的日志。在许可证错误之前是否有某些事件(Windows升级,IIS错误等)?
b)描述您的应用程序在IIS中使用的应用程序池
c)描述您的应用程序:其目标框架,Web应用程序(预编译)或网站(按需编译),EF6版本(6.4等)
d)指定您的连接字符串(用星号标记机密信息)
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。