Ask a Question related to ASP.NET General, Design and Development.
-
Alvin Bruney #1
Re: Locate assemblies in ASP.NET
look into machine.config file
"Hilton" <nomail@intellilogic.com> wrote in message
news:02a701c34d05$7bba5490$a001280a@phx.gbl...> Is there a way to tell ASP.NET how to locate assemblies
> within a web site?
>
> I have multiple sites which need to share .ASCX controls.
> As a control cannot be loaded from outside the
> application area, I create a virtual directory from each
> site to the shared control's directory, thus including
> the shared directory in both site's applications. The
> code for the control's base class (codebehind) is located
> in the assembly of the application and is thus in the
> application's BIN directory.
>
> My problem is that when the site loads the control it
> will generate an error indicating that it cannot load an
> instance of the base/codebehind class. It does not seem
> to be looking up the logical chain of the application &
> virtual directory to find it. (I would have expected it
> to search the virtual directories local directory first &
> associated BIN directory and then move up to the
> application level but this does not seem to occur). This
> behaviour seems to be erratic - sometimes I configure
> sites and it works fine, other times it has this problem.
>
> If the shared control is copied to a physical directory
> in the site as opposed to a virtual directory then it
> works as it should (but is obviously not shared).
>
> For example, if we have 2 sites, SITEA & SITEB and a
> directory called SAMPLE containing a .ASCX control then
> the logical layout would look like this:
>
> d:\inetpub\shared\sample\mysample.ascx
>
> /SITEA
> /BIN
> /SAMPLE (maps to sample directory)
>
> /SITEB
> /BIN
> /SAMPLE (maps to sample directory)
>
> Trying to load an instance of /sample/sample.ascx from
> either SITEA or SITEB will fail. It appears that we
> somehow need to tell the control to locate the baseclass
> in the assembly located in the site's bin directory. Is
> the control possibly looking up a physical path rather
> than a logical path to located the assembly?
>
> Any ideas?
>
> Thanks,
>
> Hilton
>
>
>
>
>
Alvin Bruney Guest
-
Are MS Assemblies in the GAC?
I want to create strongly signed support assemblies so they can be shared by different ASP.NET web apps. This requires that they be installed into... -
Too many assemblies asp.net
I have been developing several web applications in VB.NET. I have started to notice that when I run one of the applications, all the assemblies for... -
Can't reference Assemblies in GAC?
I've just created a simple class library, gave it a strong name using sn.exe, then copied it to c:\winnt\assembly directory. I then created an ASP... -
Locating assemblies in ASP.NET
An ASPX page in a virtual directory does not find the compiled assembly containing the base class located in the application's bin directory... -
versioning of assemblies
Hi, I was reading a doc on versioning, and came to know that versioning of assemblies are easier than ever. Can sb pl mention me, how this can be...



Reply With Quote

