So I have this asp.net mvc project that was created from the default template that visual studio provides you with under .NetFramework 4.7.2 and installed both the sensenet.service.install and sensenet.webpages.install package and ran through the process of installing them. After that, I pressed F5 and confirmed that everything was working fine on my machine. From there, I decided to publish this project on azure and what I was greeted with was this when the webpage loaded
[Exception: ReflectionTypeLoadException: Could not load types. Affected types:
Lucene.Net.Store.RAMDirectory
Lucene.Net.Search.FieldDoc
Lucene.Net.Search.NumericRangeQuery
Lucene.Net.Search.SortField
Lucene.Net.Index.Term
First message: Type 'Lucene.Net.Store.RAMDirectory' in assembly 'Lucene.Net, Version=2.9.4.301, Culture=neutral, PublicKeyToken=null' has method 'OnDeserialized' with an incorrect signature for the serialization attribute that it is decorated with.]
SenseNet.Services.SenseNetGlobal.get_Instance() in E:\BuildAgent\_work\63\s\src\Services\SenseNetGlobal.cs:74
SenseNet.Portal.Global.Application_Start(Object sender, EventArgs e) in E:\BuildAgent\_work\63\s\src\Services\Global.cs:15
[HttpException (0x80004005): ReflectionTypeLoadException: Could not load types. Affected types:
Lucene.Net.Store.RAMDirectory
Lucene.Net.Search.FieldDoc
Lucene.Net.Search.NumericRangeQuery
Lucene.Net.Search.SortField
Lucene.Net.Index.Term
First message: Type 'Lucene.Net.Store.RAMDirectory' in assembly 'Lucene.Net, Version=2.9.4.301, Culture=neutral, PublicKeyToken=null' has method 'OnDeserialized' with an incorrect signature for the serialization attribute that it is decorated with.]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +10062153
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +118
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +173
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296
[HttpException (0x80004005): ReflectionTypeLoadException: Could not load types. Affected types:
Lucene.Net.Store.RAMDirectory
Lucene.Net.Search.FieldDoc
Lucene.Net.Search.NumericRangeQuery
Lucene.Net.Search.SortField
Lucene.Net.Index.Term
First message: Type 'Lucene.Net.Store.RAMDirectory' in assembly 'Lucene.Net, Version=2.9.4.301, Culture=neutral, PublicKeyToken=null' has method 'OnDeserialized' with an incorrect signature for the serialization attribute that it is decorated with.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +10043444
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +95
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
There was a comment in this github issue https://github.com/dotnet/standard/issues/300 that said that this was fixed in .NetFramework 4.7.2 but this does not seem to be the case for me.
So my question is, why did this exception not occurred when I ran this project locally versus publishing it on azure?
Aucun commentaire:
Enregistrer un commentaire