[英]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.