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

Recently I was deploying a module of a website on top of another virtual directory.

Of course the simplest way is to make this directory as an IIS application, but that's the last option.

What I did was to override the "base" web.config file and add the following lines:

<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="bin;MYDIRECTORY/BIN"/>
</assemblyBinding>
</runtime>
</configuration>


What it basically does, is tell the IIS to look for bin objects in the MYDIRECTORY/BIN folder relative to the virtual directory itself.
Could not load the assembly 'App_Web_xxx'. Make sure that it is compiled before accessing the page. Could not load the assembly 'App_Web_xxx'. Make sure that it is compiled before accessing the page. Reviewed by Edward Legaspi on Wednesday, October 20, 2010 Rating: 5

No comments:

Powered by Blogger.