Re: Referencing Assembly Question Without GAC?

From: Scott Allen (bitmask_at_[nospam)
Date: 12/01/04


Date: Wed, 01 Dec 2004 17:20:32 -0500

You could use assemblyBinding in the .config file to specify a
different subdirectory for assemlies ...

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

.. but that doesn't sound like it fits your scenario.

There is Assembly.LoadFile also.

Just remember the shadow copy feature only works from the bin
directory by default. Outside of the bin the assemblies are locked.

My suggestion would be to practice good configuration management and
deploy / update the sites as a single tested application and including
all dependant assemblies. Pushing out a single dll and copying it
across various directories sounds dangerous to me. Copying it to a
single directory sounds even more dangerous.

--
Scott
http://www.OdeToCode.com/blogs/scott/
On Wed, 1 Dec 2004 13:35:04 -0800, "Mike"
<Mike@discussions.microsoft.com> wrote:
>I don't care about the version capabilities and the wwwroot/bin will not work 
>"for me" because I can't put things in that directory. Because of my 
>environment I only have control of web sites... so the best solution would be 
>if I could have all web sites use 1 certain web sites bin as the assembly 
>cache.
>
>"WizyDig" wrote:
>
>> When you do this you will not have the multi version version cabablities for
>> that you need a strong name and to register them in the GAC.
>> 
>> -wiz
>> 
>> "Tampa .NET Koder" <TampaNETKoder@discussions.microsoft.com> wrote in
>> message news:9D5A712C-8602-4D48-96D0-695441A4E574@microsoft.com...
>> > I stand to be corrected; but I believe you can just deploy all of your
>> common
>> > assemblies in a bin folder located under wwwroot:
>> > -wwwroot
>> > ----/bin
>> >
>> > this way all sub applications can share this very same assembly deployed
>> in
>> > this folder.  So, you would just have to replace the single assemble
>> deployed
>> > under the wwwroot/bin folder.  try this out
>> >
>> >
>> > "Mike" wrote:
>> >
>> > > I found this question before I asked mine:
>> > >
>> > > ----<previous question>----
>> > > We are clearly going about this the wrong way so before we get too far I
>> > > would like some advice.
>> > >
>> > > We have all common assemblies like our page base class etc located on
>> our
>> > > Dev server.
>> > >
>> > > We reference them in all our applications with Copy Local set to trued
>> > >
>> > > We then publish them to the production server for example so each
>> asp.net
>> > > app has a copy of the common assembly in the bin directory.
>> > >
>> > > This is of course leaving us with the problem of having to replace the
>> > > assembly in every bin directory when a change is made.
>> > >
>> > > What is the best practice to avoid this issue?
>> > >
>> > > Thanks a million,
>> > >
>> > > Jason MacKenzie"
>> > > ----</previous question>----
>> > >
>> > > I have this same issue, however I can't use the GAC because of different
>> > > reasons out of my control. Can someone help with the best practice?
>> > >
>> > > THANKS!
>> 
>> 
>> 


Relevant Pages

  • RE: Problem with WinForms User Control Hosted in IE
    ... the bin dir is a particular directory which is used by asp.net ... application to store application assemblies, so by default it should not be ... public to internet(so no read permission is granted), ... Problem with WinForms User Control Hosted in IE ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: web apps and the GAC (cannot update assemblies)
    ... If you copy the signed DLLs into your BIN ... Yes you can pre-register GAC DLLs with the application in Web.Config like ... dependencies of assemblies which may be what the problem is. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Assembly could not be loaded???
    ... Attempting download of new URL ... > How ever my web application <BIN> folder and the ... > redirected any assemblies either. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Dynamic load ascx control when DLL not in "/bin"
    ... The best option you have is to create a directory under bin with the same name as your assembly, but I have a feeling this isn't what you're looking for. ... ascx components. ... I'd like to be able to place them, in a subfolder of "/plugins folder". ... But when i done that i've got a parse error: "Parser Error Message: Could not load type 'XXX.YYY'" Because asp.net is not able ton find the assemblies ... ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • use of c:inetpubwwwrootin directory
    ... If your webpart has an assembly, ... It also has to reside in the BIN ... It will initially try to load the assembly from the GAC, ... >runtime will look for .NET assemblies. ...
    (microsoft.public.sharepoint.portalserver.development)