Multiple /bin folders in ASP.NET

About a week ago, Scott Hanselman posted a neat tip on deploying multiple /bin folders in an ASP.NET application. What's really cool about this is that it lets you build a pseudo plugin architecture into your existing ASP.NET website.


This is a companion discussion topic for the original blog entry at: http://www.codinghorror.com/blog/2004/11/multiple-bin-folders-in-aspnet.html

Hi Jeff, This solution is just what I have been searching for, except… I get the following error:

Parser Error Message: Access is denied: ‘adminorders’.

Source Error:

Line 1: %@ Assembly Name=“adminorders” %
Line 2: %@ Page Language=“vb” AutoEventWireup=“false” Codebehind=“test.aspx.vb” Inherits=“adminorders.test”%
Line 3: !DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”

Source File: c:\inetpub\wwwroot\cdms\adminorders\test.aspx Line: 1

Assembly Load Trace: The following information can be helpful to determine why the assembly ‘adminorders’ could not be loaded.

=== Pre-bind state information ===
(Partial)
Calling assembly : (Unknown).

I have seached for ways to solve this and have had no luck. I am on Windowx XP so folder permissions shounldn’t really affect this.

Do you have any suggestions to help me get this to work?

Ta
Clive.

It’s the Index Service:

a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;329065"http://support.microsoft.com/default.aspx?scid=kb;en-us;329065/a

Oh man. Thanks. Same problem. Never would have guessed the indexing service was the problem. Was driving me out of my head.

ASP.Net - “LOG: Policy not being applied to reference at this time”

Potential Causes/Solutions for this issue I’ve seen online:

  • web server runs out of space – free up disk space
  • aspnet worker process is messed up – kill aspnet worker process (development environment obviously)
  • Indexing Service is running (and locking files) – disable it
  • assemblies are in bin that aren’t supposed to be (ref), and the machine.config has an add assembly="*" (all) – remove unreferenced/unnecessary DLLs from the bin folder.

The last bullet is what I ran into - I removed the DLLs (named “Copy of dllNameHere.dll”) from the bin folder and voila! my web service worked. I never saw this fix anywhere, so I’m posting it. Hope it helps.

Matthew Hughes
Systems Developer, MCSD
Program Director, LANUG
http://www.loweraldotnet.org

Mat, the last one fixed the problem for me. I deleted all the dlls from the bin, and then readded them and everything worked. Thanks.

For me it turned out to be Avira AntiVir. Removing it seems to have fixed the problem. I’ll stick with AVG.

man, i can’t believe it: deactivating AntiVir Guard really solved it.

Same idea without having to modify any file beyond the root web.config:

runtime
assemblyBinding xmlns=urn:schemas-microsoft-com:asm.v1
probing privatePath=WebFileManager\bin /
/assemblyBinding

    dependentAssembly
        assemblyIdentity name=WebFileManager /
     /dependentAssembly

/runtime

I had the same issue, tried everything suggested on this page and nothing helped.

What did the trick for me is to give ASPNET user full rights to the windows/temp directory.

I had the same problem, but i’ve solved it… thanks a lot!!

Quito, Ecuador

I’m confused: why not simply create a virtual directory/application within that website (at IIS) instead? That’s a one-time setup also. Why mess with web.config changes and changes in that third-party’s aspx files (isn’t that riskier)?

If this was about development setup within Visual Studio, there are other ways to keep both web projects running without having one a child of another in the VS solution tree, while still having them accessed with the same URLs as if one IS a child of another.

Leaving confused…