在服务器中部署后出现组装错误

编程入门 行业动态 更新时间:2024-10-25 19:20:42
本文介绍了在服务器中部署后出现组装错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我将应用程序部署到域时收到此错误

Could not load file or assembly ''System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'' or one of its dependencies. The system cannot find the file specified.

在Web配置中,引用以下内容:

< 组件 > ; < 添加 程序集 =" System.Web.Extensions.Design,版本= 4.0.0.0, Culture = neutral,PublicKeyToken = 31BF3856AD364E35" / > < 添加 程序集 =" System.Design,版本= 4.0.0.0,文化=中性, PublicKeyToken = B03F5F7F11D50A3A" / > < 添加 程序集 =" System.Windows.Forms,Version = 4.0.0.0,Culture =中性,PublicKeyToken = B77A5C561934E089" / > < 添加 程序集 =" System.Speech,版本= 4.0.0.0,文化=中性, PublicKeyToken = 31BF3856AD364E35" / > < 添加 程序集 =" System.Web.Routing,Version = 4.0.0.0,Culture =中性,PublicKeyToken = 31BF3856AD364E35" / > < /assembly > 我引用了这个线程: stackoverflow/questions/267006/could- not-load-file-or-assembly-system-web-mvc [ ^ ] 我已经添加了程序集,但是我无法在bin文件夹中看到它,就像我在.NET中添加的所有其他程序集一样.我可以看到添加的其他自定义程序集,但无法看到.NET内置程序集.我如何使它们可见以将其本地副本设置为true 谢谢

解决方案

程序集应添加到GAC中,而不是bin中.

检查此链接 BIN将具有Razor的ASP.NET MVC 3部署到未安装MVC的Windows Server

hi , im getting this error when i deployed application to domain

Could not load file or assembly ''System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'' or one of its dependencies. The system cannot find the file specified.

while in the web config , following are refernced :

<assemblies> <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> <add assembly="System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> </assemblies>

i referenced this thread : stackoverflow/questions/267006/could-not-load-file-or-assembly-system-web-mvc[^] i have added assembly but im unable to see it in bin folder like all other assemblies which i have added of .NET. I can see other custom assemblies which i add but im unable to see .NET builtin assemblies. How i make them visible to set their local copy to true Thanks

解决方案

The assembly should be added to the GAC not the bin

Check this link BIN Deploying ASP.NET MVC 3 with Razor to a Windows Server without MVC installed

更多推荐

在服务器中部署后出现组装错误

本文发布于:2023-11-13 12:04:22,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1584311.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:器中   错误

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!