473,408 Members | 2,888 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

GAC and User Controls

Hello,

We have user controls that we want to share between
applications.

We have a web app that has only the ascx, this is a sub
virtual root of all our applications.

What we have done is generated a dll will all the codehind
of the User Controls.

This dll is registered in the GAC, and the other
applications reference the location of the dll.(It doesnīt
copy the assembly, which is what itīs supposed to do)

The problem is when we load a page that uses one of these
user controls, we get an error that it can load type:

<%@ Control Language="vb" AutoEventWireup="false"
Inherits="UserControls.Header"
TargetSchema="http://schemas.microsoft.com/intellisense/ie5
" %>

If i copy the UserControls.dll to the BIN folder of the
Web application everything works fine.

But then what itīs the use of the GAC'ed dll?

Is it possible to inherit in the control directive from a
dll that is not in the bin folder?

Many Thanks,

Manuel
Nov 18 '05 #1
1 1312
You probably need to indicate to ASP.NET to look in the
GAC for the assembly in question. This is done by adding
an <assemblies> tag to the <compilation> section in
web.config. For example.

<compilation defaultLanguage="c#" debug="true">
<assemblies>
<add assembly="ObjectSharp.Logging,
Version=1.0.202.720, Culture=neutral,
PublicKeyToken=ebe272337da14566" />
</assemblies>
</compilation>

Keep in mind that the assembly attribute needs to be on a
single line, regardless of how this breaks in this
message.

Bruce Johnson
http://www.ObjectSharp.com/Bruce
-----Original Message-----
Hello,

We have user controls that we want to share between
applications.

We have a web app that has only the ascx, this is a sub
virtual root of all our applications.

What we have done is generated a dll will all the codehind of the User Controls.

This dll is registered in the GAC, and the other
applications reference the location of the dll.(It doesnīt copy the assembly, which is what itīs supposed to do)

The problem is when we load a page that uses one of these user controls, we get an error that it can load type:

<%@ Control Language="vb" AutoEventWireup="false"
Inherits="UserControls.Header"
TargetSchema="http://schemas.microsoft.com/intellisense/i e5" %>

If i copy the UserControls.dll to the BIN folder of the
Web application everything works fine.

But then what itīs the use of the GAC'ed dll?

Is it possible to inherit in the control directive from a dll that is not in the bin folder?

Many Thanks,

Manuel
.

Nov 18 '05 #2

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

Similar topics

1
by: Robert Howells | last post by:
Perhaps I'm just too new at this to pull it off, or perhaps it's just bad architecture. I'd appreciate some feedback on the the wisdom (or lack thereof) in attempting the following: I'm not new...
6
by: Steve Booth | last post by:
I have a web form with a button and a placeholder, the button adds a user control to the placeholder (and removes any existing controls). The user control contains a single button. I have done all...
4
by: Tim::.. | last post by:
Can someone please help.... I'm having major issues with a user control I'm tring to create! I an trying to execute a sub called UploadData() from a user control which I managed to do but for...
2
by: Tim::.. | last post by:
Can someone please help.... I'm having major issues with a user control I'm tring to create! I an trying to execute a sub called UploadData() from a user control which I managed to do but for...
0
by: Tim::.. | last post by:
Can someone please help.... I'm having major issues with a user control I'm tring to create! I an trying to execute a sub called UploadData() from a user control which I managed to do but for...
3
by: Tim::.. | last post by:
Can someone please help.... I'm having major issues with a user control I'm tring to create! I an trying to execute a sub called UploadData() from a user control which I managed to do but for...
1
by: Demetri | last post by:
I'm trying to determine if we want to use panels or user controls for our pages. Our primary concern is performance, page loading and posting speed. To illustrate my question, lets use the...
8
by: mark.norgate | last post by:
I've run into a few problems trying to use generics for user controls (classes derived from UserControl). I'm using the Web Application model rather than the Web Site model. The first problem...
3
by: Terry Olsen | last post by:
I'm trying to add a domain user to a local group using the code below: Dim LCL As New DirectoryEntry("WinNT://" + Environment.MachineName + ",computer") Dim DOM As New...
1
by: zeya_bakhtyar | last post by:
Here is the page architecture: Page loads multiple user controls (including nested user controls) dynamically based on parameters provided into place holders. Note: The page only has the logic to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
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...
0
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...

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.