简体   繁体   English

在服务器上工作,但发布后出现错误

[英]On server works but after the publishing i get an error

I have ASP.NET v3.5 website project. 我有ASP.NET v3.5网站项目。 My project works at visual stduio on server.But after the publishing, i get error. 我的项目在服务器上的Visual Stduio上工作。但是发布后,我得到了错误。

"Could not load the assembly 'App_Web_wkfb1ehc'. Make sure that it is compiled before accessing the page." “无法加载程序集'App_Web_wkfb1ehc'。在访问页面之前,请确保已对其进行了编译。”

i think this is an Application Pool problem but i don't know how to fix 我认为这是一个应用程序池问题,但我不知道如何解决

This is annoying since I have seen this before and I'm trying to recall how we fixed it. 这很烦人,因为我之前已经看过这个,而且我想回想一下我们是如何解决的。

One thing we did do we totally delete the contents of the site's bin folder on the server, then re-deployed. 我们所做的一件事是,我们完全删除了服务器上站点bin文件夹的内容,然后重新部署。 Basically when you compile your site's code, VS will generate these "App_Web_*" names for the DLL files and sometimes a new DLL file is compiled for a page code-behind, but an old DLL for that page is hanging around in the bin folder, which can cause the error you are seeing (at least I think that's was we thought the problem was :) ) 基本上,当您编译站点的代码时,VS会为DLL文件生成这些“ App_Web_ *”名称,有时还会为页面代码隐藏一个新的DLL文件,但是该页面的旧DLL仍然挂在bin文件夹中,这可能会导致您看到的错误(至少我认为这是我们认为的问题所在:))

Another thing you could do is to set fixed DLL namings for your project. 您可以做的另一件事是为您的项目设置固定的DLL名称。 Info on how to do that can be found here: http://msdn.microsoft.com/en-us/library/aa992037(v=vs.80).aspx . 有关如何执行此操作的信息,可以在这里找到: http : //msdn.microsoft.com/zh-cn/library/aa992037(v=vs.80).aspx If you still get problems after changing that setting, then have a look at this SO question: 如果更改该设置后仍然遇到问题,请查看以下SO问题:

ASP.NET WebForms Deployment - Setting the compiled \\bin directory DLL names ASP.NET WebForms部署-设置已编译的\\ bin目录DLL名称

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么发布 Azure Function 后出现内部服务器错误? - Why I get Internal Server Error after publishing Azure Function? 将 blazor-server 应用程序发布到服务器后无法从 tes.net.binance.vision 获得结果 [在本地主机工作] - after publishing blazor-server app to server cannot get result from testnet.binance.vision [works in localhost] 发布后的内部服务器错误和未创建的表 - Internal Server Error after publishing and Tables not being created 将Wcf服务发布到远程服务器后,缓冲区大小错误 - Buffer Size Error after publishing Wcf Service to a Remote Server 仅在发布WCF服务器之后才自动映射错误映射类型 - Automapper Error mapping types only after publishing WCF server 发布到Web服务器后将字符串转换为DateTime时出错 - Error while converting string to DateTime after publishing to web server 发布后Web服务中的错误 - Error in webservice after publishing 从blob下载可在本地工作,但发布后则无法工作 - downloading from blob works locally but not after publishing printdocument和对话框中的C#错误在VS中有效,但发布项目后无效 - C# error in printdocument and dialog works in VS but not after publishing my project 发布Silverlight应用程序后出现错误 - Error after publishing Silverlight application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM