R
Rick Strahl [MVP]
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 ---
--
Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/wwHelp
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 ---
--
Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/wwHelp