gpt4 book ai didi

asp.net-mvc-3 - SimpleMembership MVC3 无法加载文件或程序集 WebMatrix.Data

转载 作者:行者123 更新时间:2023-12-03 18:18:00 25 4
gpt4 key购买 nike

我正在使用 SimpleMembership.MVC3 包来管理成员资格。开发时一切正常,但当我部署到 Azure Web 角色时,它会抛出以下异常:

Could not load file or assembly 'WebMatrix.Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

stack trace: [FileLoadException: Could not load file or assembly 'WebMatrix.Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
WebMatrix.WebData.PreApplicationStartCode.Start() +0

[InvalidOperationException: The pre-application start initialization method Start on type WebMatrix.WebData.PreApplicationStartCode threw an exception with the following error message: Could not load file or assembly 'WebMatrix.Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040).]
System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods) +11711966
System.Web.Compilation.BuildManager.CallPreStartInitMethods() +465
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +1167

[HttpException (0x80004005): The pre-application start initialization method Start on type WebMatrix.WebData.PreApplicationStartCode threw an exception with the following error message: Could not load file or assembly 'WebMatrix.Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040).]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11700896 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +141 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4869125

当我安装 Nuget 包时,没有下载 WebMatrix.Data 程序集。我已手动添加了在 Program Files/Microsoft ASP.NET 目录中找到的 WeBMatrix.Data.DLL,但该程序集的版本是 2.x,缺少的是版本 1.x

缺少什么?

最佳答案

我也遇到了同样的问题。我右键单击项目中的引用并转到“属性”。将 CopyToLocal 设置从 True 更改为 False 并重建项目。解决了我的问题。

关于asp.net-mvc-3 - SimpleMembership MVC3 无法加载文件或程序集 WebMatrix.Data,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12762125/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com