Our ASP.NET core RC1 application stopped working and then started working again

末鹿安然 提交于 2020-01-06 19:50:13

问题


We have built an .NET application on ASP.NET core RC1 (release candidate 1) and deployed it on Windows Azure in an Web App container. By August the 2'nd the application stopped working over night. We found out it was caused by the fact that Microsoft stopped supporting RC1 (and RC2 for that matter) by that date.

The strange thing is that by today the application started working again without any change from our side.

Can anyone explain that behavior? I don't feel very comfortable with these kind of changes in the container environments.

NB: I should add that the error we saw in the log files was this one:

MissingMethodException: Method not found: 'Newtonsoft.Json.JsonSerializerSettings Microsoft.AspNet.Mvc.MvcJsonOptions.get_SerializerSettings()'

回答1:


I can explain what happened: a version of Json.NET v6.0.4 was mistakenly added to the GAC. Due to the way Json.NET is versioned, apps that had a different 6.x version in their bin folder ended up loading the one in the GAC. Your RC1 app probably has v6.0.7, and broke because v6.0.4 was missing APIs.

This assembly is not supposed to be in the GAC at all, so when we realized the issue, we removed it, which is when your app started working again. Apologies for the downtime.

That being said, you really should move away from RC1, which is not officially supported.



来源:https://stackoverflow.com/questions/38851380/our-asp-net-core-rc1-application-stopped-working-and-then-started-working-again

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!