[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.sdk

ASP.Net Runtime Hosting and finding Assemblies

Rick Strahl

10/17/2003 11:29:00 PM

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\DebugLOG: 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 ---

--

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



2 Answers

Wim Hollebrandse

10/19/2003 7:06:00 PM

0

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.w...
http://www.w...

---
Posted using Wimdows.net Newsgroups - http://www.w.../newsgroups/

Rick Strahl

10/29/2003 9:35:00 AM

0

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 ---

--

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


"Wim Hollebrandse" <wim@-NOSPAM-wimdows.net> wrote in message
news:OgkDRQnlDHA.1004@TK2MSFTNGP09.phx.gbl...
> 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.w...
> http://www.w...
>
> ---
> Posted using Wimdows.net Newsgroups - http://www.w.../newsgroups/