You need to tell ASP.NET explicitly to look for assemblies in the GAC.
Unlike WinForms application which automatically look in the GAC, ASP.NET
applications do not.
You can do this by adding something like this:
<compilation defaultLanguage="c#" debug="true">
<assemblies>
<add assembly="MyAssembly.MyClass, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"/>
</assemblies>
</compilation>
to web.config. You need to use the strong name for the assembly.
Hope this helps,
+++ Rick ---
--
Rick Strahl
West Wind Technologies
www.west-wind.com
www.west-wind.com/weblog
"Web Team @ Borough of Poole" <> wrote in message
news: oups.com...
> Hi All,
>
> I recently moved our assembly which stores our 'common' code into the
> GAC. I then moved all copies of this assembly out of the /bin folders,
> restarted IIS. I get the error below.
>
> This is the first time I have put something into the GAC, from what I
> read, the GAC is probed first, before looking to application folders,
> so surely my code should load from the GAC, if its not in the app
> folders? Or, is the error due to the way we have referenced the
> libraries when building (Referenced by project).
>
> Any help/advice on this will be appreciated.
>
> Thanks,
>
> Simon.
>
>
>
> Server Error in '/netapps' Application.
> --------------------------------------------------------------------------------
>
> File or assembly name OldInfra, or one of its dependencies, was not
> found.
> Description: An unhandled exception occurred during the execution of
> the current web request. Please review the stack trace for more
> information about the error and where it originated in the code.
>
> Exception Details: System.IO.FileNotFoundException: File or assembly
> name OldInfra, or one of its dependencies, was not found.
>
> Source Error:
>
> An unhandled exception was generated during the execution of the
> current web request. Information regarding the origin and location of
> the exception can be identified using the exception stack trace below.
>
>
> Assembly Load Trace: The following information can be helpful to
> determine why the assembly 'OldInfra' could not be loaded.
>
>
> === Pre-bind state information ===
> LOG: DisplayName = OldInfra, Version=1.0.2056.26999, Culture=neutral,
> PublicKeyToken=null
> (Fully-specified)
> LOG: Appbase = file:///D:/Introot/netapps
> LOG: Initial PrivatePath = bin
> Calling assembly : EmpPhotos, Version=1.0.2056.26999, Culture=neutral,
> PublicKeyToken=null.
> ===
>
> LOG: Policy not being applied to reference at this time (private,
> custom, partial, or location-based assembly bind).
> LOG: Post-policy reference: OldInfra, Version=1.0.2056.26999,
> Culture=neutral, PublicKeyToken=null
> LOG: Attempting download of new URL
> file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
> Files/netapps/54285709/c2671f29/OldInfra.DLL.
> LOG: Attempting download of new URL
> file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
> Files/netapps/54285709/c2671f29/OldInfra/OldInfra.DLL.
> LOG: Attempting download of new URL
> file:///D:/Introot/netapps/bin/OldInfra.DLL.
> LOG: Attempting download of new URL
> file:///D:/Introot/netapps/bin/OldInfra/OldInfra.DLL.
> LOG: Attempting download of new URL
> file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
> Files/netapps/54285709/c2671f29/OldInfra.EXE.
> LOG: Attempting download of new URL
> file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
> Files/netapps/54285709/c2671f29/OldInfra/OldInfra.EXE.
> LOG: Attempting download of new URL
> file:///D:/Introot/netapps/bin/OldInfra.EXE.
> LOG: Attempting download of new URL
> file:///D:/Introot/netapps/bin/OldInfra/OldInfra.EXE.
>
>
>
> Stack Trace:
>
>
> [FileNotFoundException: File or assembly name OldInfra, or one of its
> dependencies, was not found.]
> EmpPhotos.stats.Page_Load(Object sender, EventArgs e) +0
> System.Web.UI.Control.OnLoad(EventArgs e) +67
> System.Web.UI.Control.LoadRecursive() +35
> System.Web.UI.Page.ProcessRequestMain() +750
>
>
>
>
> --------------------------------------------------------------------------------
> Version Information: Microsoft .NET Framework Version:1.1.4322.2032;
> ASP.NET Version:1.1.4322.2032
>