473,586 Members | 2,855 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP.Net Runtime Hosting and finding Assemblies

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.Wi ndows.Forms"%>
When this page loads it gets:

=== Pre-bind state information ===
LOG: DisplayName = System.Windows. Forms
(Partial)
LOG: Appbase = D:\projects\Asp NetHosting\bin\ Debug\
LOG: Initial PrivatePath = NULL
Calling assembly : System.Web, Version=1.0.500 0.0, Culture=neutral ,
PublicKeyToken= b03f5f7f11d50a3 a.
===

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 CreateApplicati onHost()) and the
default HttpRuntime.Cre ateApplicationH ost(). 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
----------------------------------
Making waves on the Web

Nov 17 '05 #1
8 2008
Hi rick,

if you make reference to your own signed assembly do you still get that
error ?
I try it (System.Windows .Forms from web app) on my machine and it works.

Natty Gur[MVP]
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #2
Hi rick,

if you make reference to your own signed assembly do you still get that
error ?
I try it (System.Windows .Forms from web app) on my machine and it works.

Natty Gur[MVP]
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #3
Hi Natty,

Well, from a Web app it works. It's from within the ASP.Net Runtime host
that it doesn't appear to work.

I have a page that does:

<%@page language="C#%>
<%@import assembly="syste m.windows.form" %>

<%
System.Windows. Form.MessageBox .Show(...);
%>

This doesn't work (can't find Windows.Forms). If I copy local then it does.
If I use my own private signed assembly and stick it in the GAC it's also
not found.
What's weird is if I use a precompiled page (with codebehind) it DOES work
(presumably because it's hard bound at compile time as opposed to the JIT
compilation at runtime).
This means that the AppDomain can get to the GAC, but it's not searching
there automaitcally if trying to dynamically locate an assembly.

Unfortunately in this case this won't work because I'm using the ASP.Net
runtime as a scripting plug in for my app.

The issue here is that the domain apparently isn't configured right so that
it finds things in the GAC...

Any ideas?

+++ Rick ---

--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/wwHelp
----------------------------------
Making waves on the Web
"Natty Gur" <na***@dao2com. com> wrote in message
news:u#******** ******@TK2MSFTN GP11.phx.gbl...
Hi rick,

if you make reference to your own signed assembly do you still get that
error ?
I try it (System.Windows .Forms from web app) on my machine and it works.

Natty Gur[MVP]
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 17 '05 #4
Hi Natty,

Well, from a Web app it works. It's from within the ASP.Net Runtime host
that it doesn't appear to work.

I have a page that does:

<%@page language="C#%>
<%@import assembly="syste m.windows.form" %>

<%
System.Windows. Form.MessageBox .Show(...);
%>

This doesn't work (can't find Windows.Forms). If I copy local then it does.
If I use my own private signed assembly and stick it in the GAC it's also
not found.
What's weird is if I use a precompiled page (with codebehind) it DOES work
(presumably because it's hard bound at compile time as opposed to the JIT
compilation at runtime).
This means that the AppDomain can get to the GAC, but it's not searching
there automaitcally if trying to dynamically locate an assembly.

Unfortunately in this case this won't work because I'm using the ASP.Net
runtime as a scripting plug in for my app.

The issue here is that the domain apparently isn't configured right so that
it finds things in the GAC...

Any ideas?

+++ Rick ---

--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/wwHelp
----------------------------------
Making waves on the Web
"Natty Gur" <na***@dao2com. com> wrote in message
news:u#******** ******@TK2MSFTN GP11.phx.gbl...
Hi rick,

if you make reference to your own signed assembly do you still get that
error ?
I try it (System.Windows .Forms from web app) on my machine and it works.

Natty Gur[MVP]
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 17 '05 #5
Hi,

Are you familiar with this article?

http://www.microsoft.com/belux/nl/ms...esmet/hostaspn
et1.mspx

It mentions there that you need to register the assembly of your
self-written ASP.NET runtime host in the GAC.

Natty Gur[MVP]
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #6
Hi,

Are you familiar with this article?

http://www.microsoft.com/belux/nl/ms...esmet/hostaspn
et1.mspx

It mentions there that you need to register the assembly of your
self-written ASP.NET runtime host in the GAC.

Natty Gur[MVP]
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #7
Hi Natty,

Thanks for the link to the article - hadn't seen this before, but I've been
through all that long ago <g>...

The issue I have now is that the ASP.Net pages that are running are not
finding anything in the GAC. IOW, the @Import statement is finding things
fine from the bin directory but not from the GAC.

I'm not sure why this would be - I was under the impression that no matter
what the Runtime will always look in the GAC first for anything in the first
place...
+++ Rick ---

--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/wwHelp
----------------------------------
Making waves on the Web
"Natty Gur" <na***@dao2com. com> wrote in message
news:eF******** ******@tk2msftn gp13.phx.gbl...
Hi,

Are you familiar with this article?

http://www.microsoft.com/belux/nl/ms...esmet/hostaspn
et1.mspx

It mentions there that you need to register the assembly of your
self-written ASP.NET runtime host in the GAC.

Natty Gur[MVP]
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 17 '05 #8
Rick Hi,

It's interesting... can you send me sample project so I can struggle
with you...

Natty Gur[MVP]
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
1839
by: Alan Roberts | last post by:
Is it possible to have conditional references and code execution in csharp? I have an app that plays Windows Media asx streams. It requires WMP 9+ to be installed for this to work and so this is a pre-requisite for my app. The app is also capable of playing real audio streams, for which it requires the codecs from Real Alternative to be...
8
34600
by: Subra Mallampalli | last post by:
Hi, I am trying to use <runtime> section within the web.config file. However, the contents of the <runtime> section seem to be ignored. What am i missing here? Is <runtime> section not used by web apps? Any help is greatly appreciated. Thanks,
5
1429
by: Charles Law | last post by:
I want to display the name and version of all assemblies (dlls?) used/required by my application in a Help | About box. Is there a way to do this? One of the problems I anticipate is that assemblies are only loaded when required. When my app loads not all assemblies are loaded. If the user goes straight to the Help About box then there will...
2
1553
by: Peter Zolja | last post by:
I use a third party for hosting; and the only way I can update my site is with FTP. To make the site faster I was wondering if I could somehow NGEN the generated assemblies (2.0 BTW) and use those to run the site via shared hosting. Right now I believe the NGENed version is placed in the GAC. Is there a way to fish those assemblies out of...
10
2201
by: =?Utf-8?B?R2Vvcmdl?= | last post by:
Hello everyone, I am wondering whether Microsoft Excel 2003 is a native application or dependent on any .Net Framework Runtime, like 1.1, 2.0 or 3.0? How about Microsoft Excel 2007? thanks in advance,
3
1171
by: Kulgan | last post by:
Hi We have a serious problem here with a 1.1 web app that has been upgraded to 2.0! Our web app can optionally use Crystal Reports. This means that it must be compiled on a machine with the Crystal runtime installed on it. In ASP.NET 1.1 we could then deploy to a production server that did not have the Crystal Reports runtime assemblies...
6
1486
by: Scott M. | last post by:
When attempting to target a specific version of the .NET Framework in my application configuration file, I get an error saying that: "To run this application, you must first install one of the following versions of the.NET framework:..." and then it lists the version that I targetted in my config file. I am building this with VS 2008 and...
0
1701
by: creo | last post by:
OS: Windows XP (32 bit) NET: .Net 2.0 runtime DevEnv: VS 2008 C++ and C# I am attempting to use an unmanaged C++ library to load a managed C# assembly and hand off control. I have the following in my C++ routine: ICLRRuntimeHost* Clr = NULL; HMODULE hMsCorEE = LoadLibraryA("mscoree.dll"); PROC_CorBindToRuntime* ...
0
7911
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8200
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7954
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8215
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6610
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5710
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5390
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3836
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
1179
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.