简体   繁体   中英

On server works but after the publishing i get an error

I have ASP.NET v3.5 website project. My project works at visual stduio on server.But after the publishing, i get error.

"Could not load the assembly 'App_Web_wkfb1ehc'. Make sure that it is compiled before accessing the page."

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. 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 :) )

Another thing you could do is to set fixed DLL namings for your project. Info on how to do that can be found here: http://msdn.microsoft.com/en-us/library/aa992037(v=vs.80).aspx . If you still get problems after changing that setting, then have a look at this SO question:

ASP.NET WebForms Deployment - Setting the compiled \\bin directory DLL names

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM