asp.net – 无法从HRESULT加载文件或程序集异常:0x80131040
发布时间:2020-05-24 00:02:46 所属栏目:asp.Net 来源:互联网
导读:我创建了我的第一个MVC 4项目,它在本地服务器上完美地工作.但是当我发布到本地文件夹并将文件夹内容上传到托管服务器时.我尝试运行它,我得到这个错误: Could not load file or assembly ‘DotNetOpenAuth.Core, Version=4.0.0.0, Culture=neutral, PublicKey
|
我创建了我的第一个MVC 4项目,它在本地服务器上完美地工作.但是当我发布到本地文件夹并将文件夹内容上传到托管服务器时.我尝试运行它,我得到这个错误:
Web.config文件: <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="DotNetOpenAuth.Core" publicKeyToken="2780ccd10d57b246" />
<bindingRedirect oldVersion="1.0.0.0-4.0.0.0" newVersion="4.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="DotNetOpenAuth.AspNet" publicKeyToken="2780ccd10d57b246" />
<bindingRedirect oldVersion="1.0.0.0-4.0.0.0" newVersion="4.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-1.3.0.0" newVersion="1.3.0.0" />
</dependentAssembly>
</assemblyBinding>
Web窗体中的同一个项目适用于托管服务器. 解决方法终于找到答案了!转到参考文献 – >对dll文件造成问题的正确的cilck – >选择属性 – >检查版本 – >将属性中的版本与Web配置匹配 <dependentAssembly>
<assemblyIdentity name="YourDllFile" publicKeyToken="2780ccd10d57b246" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-YourDllFileVersion" newVersion="YourDllFileVersion" />
</dependentAssembly> (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- asp.net-mvc – 如何在没有其他操作匹配的情况下为我的控制
- ASP.NET错误:页面Y.ascx无法使用用户控件X.ascx
- asp.net – FindControl()返回null
- asp.net – 使用相同登录数据库的多个应用程序相互记录
- MVC3Razor – 将DateTime字符串从“mm / dd / yyyy 12:00:0
- asp.net-mvc – 授权标签如何工作? – Asp.net Mvc
- asp.net – 用于DropDownList的MVC2 EditorTemplate
- asp.net-mvc – 使用默认控制器的ASP.NET MVC路由
- asp.net http服务器推送到客户端
- asp.net – 加密ASP .NET 2.0和SQL Server 2005中的工资值
推荐文章
站长推荐
热点阅读
