|
A few days ago, I moved an old project of asp.net to linux, which is based on asp.net 4.0 + Nhibernate + FluentNhibernate, and encountered a rare problem in the process of migration, climbed a lot of articles, including Chinese, English, and finally found the answer on a Japanese website (by Google Translate), which can be described as quite painful, and I have recorded it First, the environment to be migrated to is centos6.5 + MONO + Jexus This happened under Nhibernate + mono, but it didn't always happen, and some of the projects I migrated to were using Nhibernate, so this problem didn't happen Initial: The following error was found in the migration So, honestly go to web.config to modify the configuration After finding the modification, it is still such a problem, a little distressed, carefully tracked, and found that there is an error when the prompt below is Nhibernate OpenSession, it seems that the problem lies here
At this time, I tried a lot of methods, including rewriting some nhibernate calling methods, crawling a lot of articles, and never finding a solution, until I finally found an explanation from a corner, and the reason for the error was thrown and explained, but the translation was too tiring...
The reason why the error occurred was:
NHibernate.AdoNet.SqlClientSqlCommandSet
With the above tests, I can't find SqlCommandSet....
It seems to be due to the platform
Current solution
nhibernate:
disposition
<property name="adonet.batch_size">0</property>
FluentNhibernate:
That is, add. AdoNetBatchSize(0)
So far, the problem has been solved, and the above is for the record, and I hope to help people who encounter the same problem to avoid some detours!
|