I was getting a weird error in a site which is using WCF. The application is silverlight and uses the WCF service for all it’s data interaction. However, while the Silverlight would load, any data access was failing. A quick browse to the address of the service gave me the dreaded “Could not load file or assembly App_Web_yadayadayada”
Strange error really, giving that I never use the published site where the app_web_xxxxxxx dlls are generated, always plumping for the Web Deployment Project flavour of deployment as it’s cleaner for uploading and quick aspx or code-behind changes as you don’t have to upload the whole site everytime you publish.
Turns out there’s an attribute you can add to your web.config to stop all this recompilation stuff. In the compilation tag , add the following attibute. Makes the site run a little faster due to not having to load debug symbols and also stops the batch recompilation of your bin folder when the AppPool recycles.
<compilation debug=”false” batch=”false”>