加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

asp.net-mvc – Razor视图:预应用程序启动初始化方法启动类型Mi

发布时间:2020-12-16 06:25:21 所属栏目:asp.Net 来源:网络整理
导读:我在Visual Studio 2012中的 Asp.net MVC 4项目中工作,当我打开一个视图时,我收到此错误: ASP.NET runtime error: The pre-application start initialization method Start on type Microsoft.Web.WebPages.OAuth.PreApplicationStartCode threw an excepti
我在Visual Studio 2012中的 Asp.net MVC 4项目中工作,当我打开一个视图时,我收到此错误:

ASP.NET runtime error: The pre-application start initialization method Start on type Microsoft.Web.WebPages.OAuth.PreApplicationStartCode threw an exception with the following error message: The type initializer for ‘DotNetOpenAuth.Reporting’ threw an exception.. C:Usersescobar5DesktopWindowsAzure1MvcWebRole1ViewsShared_LoginPartial.cshtml

所以我失去了intellisense,因为在那次错误之后,对ViewBag或模型的每次调用都说:“无法找到编译动态表达式所需的一种或多种类型”

我从Nuget更新了OAuth包,但我仍然收到错误.

该项目运行良好,问题只是用剃刀.

这是错误的屏幕截图,以获取更多详细信息:

有任何想法吗?

提前致谢

解决方法

我发现以下解释和更新DotNetOpenAuth.OAuth.Consumer与nuget包管理器解决了错误的问题.

https://groups.google.com/forum/?fromgroups=#!topic/dotnetopenid/js58kMaWvvo

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读