Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / .NET SDK / October 2003

Tip: Looking for answers? Try searching our database.

ASP.Net Runtime Hosting and finding Assemblies

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rick Strahl [MVP] - 18 Oct 2003 00:29 GMT
Hi all,

I'm building an app that uses the ASP.Net runtime...

One problem I've run into is that pages running inside of the runtime are
not finding DLLs in the GAC. In fact, if I look at the debug trace of the
search path it searches the bin directory and Temporary ASP files but not
the GAC.

A simple example I used was trying to load System.Windows.Forms. If I add a
reference to my project and make it copy local it works. If I don't do this
however and the DLL lives only in the GAC it does not.

For example, if I do:

<%@page language="C#" trace="true"%>
<%@assembly name="System.Windows.Forms"%>

When this page loads it gets:

=== Pre-bind state information ===
LOG: DisplayName = System.Windows.Forms
(Partial)
LOG: Appbase = D:\projects\AspNetHosting\bin\Debug\
LOG: Initial PrivatePath = NULL
Calling assembly : System.Web, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a.
===

LOG: Policy not being applied to reference at this time (private, custom,
partial, or location-based assembly bind).
LOG: Post-policy reference: System.Windows.Forms
LOG: Attempting download of new URL
file:///D:/projects/AspNetHosting/bin/Debug/System.Windows.Forms.DLL.
LOG: Attempting download of new URL
file:///D:/projects/AspNetHosting/bin/Debug/System.Windows.Forms/System.Windows.Forms.DLL.
LOG: Attempting download of new URL
file:///D:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/localscript/853d03f1/399ca7d6/System.Windows.Forms.DLL.
LOG: Attempting download of new URL
file:///D:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/localscript/853d03f1/399ca7d6/System.Windows.Forms/System.Windows.Form
s.DLL.
LOG: Attempting download of new URL
file:///D:/projects/AspNetHosting/bin/Debug/System.Windows.Forms.EXE.
LOG: Attempting download of new URL
file:///D:/projects/AspNetHosting/bin/Debug/System.Windows.Forms/System.Windows.Forms.EXE.
LOG: Attempting download of new URL
file:///D:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/localscript/853d03f1/399ca7d6/System.Windows.Forms.EXE.
LOG: Attempting download of new URL
file:///D:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/localscript

I've tried both custom loading (custom CreateApplicationHost()) and the
default HttpRuntime.CreateApplicationHost(). Both exhibit this same
behavior.

Anybody have any ideas how I can change it so the GAC is probed? Or maybe on
more broad terms - if I build my domain manually how does it see the GAC...

I was under the impression that no matter what the GAC would be accessed. In
this context however it appears that htis is not the case..

TIA,

+++ Rick ---

Signature

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/wwHelp
----------------------------------
Making waves on the Web

Wim Hollebrandse - 19 Oct 2003 20:06 GMT
Assemblies installed in the GAC usually require Full Trust level.

Maybe the trust level for ASP.NET as configured in the machine.config does not run under 'FullTrust'?

Just a guess though.

Regards,
Wim Hollebrandse
http://www.wimdows.net
http://www.wimdows.com

---
Rick Strahl [MVP] - 29 Oct 2003 10:35 GMT
Thanks Wim,

It turns out there's a weird problem with the way thte ASP.Net runtime host
AppDomain is loaded.

I can get the Assemblies to be seen in two ways: If i specify a fully
qualified name, or if I register them explicitly (by fully qualified
assembly name) in the runtime section of web.config.

I'm not sure what is causing this behavior to occur - it must be some flag
that is set on AppDomain creation (which I am doing manually), but I can't
think of what is causing this...

+++ Rick ---

Signature

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/wwHelp
----------------------------------
Making waves on the Web

> Assemblies installed in the GAC usually require Full Trust level.
>
[quoted text clipped - 8 lines]
>
> ---

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.