473,569 Members | 2,652 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Custom controls and the GAC

Hi!

I haved created a rendered custom control, placed it in a class library
(DLL), assigned a strong name and installed in the GAC. I also have other
utilities, that are in class libraries, and are in the GAC. All of these are
used from my webpage, and my webpage references them, and they also
reference one another.

I add all references of the DLLs to the project, compile and run the
project.

Now everything is accessed from the GAC (I mean my class libraries),
however, if a copy of that one single class library that has the custom
control is not in the application bin\ folder, then the page refuses to
load. It complains at the @Register directive, saying and cannot load this
one assembly, and lists me paths, where it wanted to find it. It doesn't
list the GAC, however.

When I copy this particular .DLL to the application bin\ folder, the
application works ok When I check what DLLs the aspnet_wp process has
loaded, however, I have to see, that even this DLL is used from the GAC.
Somehow, it's just it requires it to start the application when it is
accessed, but then it still uses the version from the GAC.

Is this a bug on ASP.NET, or am I doing something wrong?

Thanks

Lenard
Nov 18 '05 #1
4 1572
Hi, Lenard,

What is the value for the "Local Copy" property of the reference to the dll
in question in the VS project for the application? If it is True try setting
it to False.

Hope this helps
Martin
"Lenard Gunda" <fr****@fbi.h u> wrote in message
news:uH******** ******@TK2MSFTN GP15.phx.gbl...
Hi!

I haved created a rendered custom control, placed it in a class library
(DLL), assigned a strong name and installed in the GAC. I also have other
utilities, that are in class libraries, and are in the GAC. All of these are used from my webpage, and my webpage references them, and they also
reference one another.

I add all references of the DLLs to the project, compile and run the
project.

Now everything is accessed from the GAC (I mean my class libraries),
however, if a copy of that one single class library that has the custom
control is not in the application bin\ folder, then the page refuses to
load. It complains at the @Register directive, saying and cannot load this
one assembly, and lists me paths, where it wanted to find it. It doesn't
list the GAC, however.

When I copy this particular .DLL to the application bin\ folder, the
application works ok When I check what DLLs the aspnet_wp process has
loaded, however, I have to see, that even this DLL is used from the GAC.
Somehow, it's just it requires it to start the application when it is
accessed, but then it still uses the version from the GAC.

Is this a bug on ASP.NET, or am I doing something wrong?

Thanks

Lenard

Nov 18 '05 #2
I've encountered the exact same issue and it could prove to be a hinderance
to our own deployment strategy if I cannot find a resolution.

Everything works fine until I set the Local Copy to False. Pages that make
use of the library through code work fine. But pages with the @ Register
directive are producing the same error that Lenard is reporting.

This seems to be telling me that (for whatever reason) the segement of the
runtime environment that is executing code behind assemblies is resolving
assembly references diferently than the way that ASP.NET is doing it for the
@ Register directive.
"Martin Dechev" wrote:
Hi, Lenard,

What is the value for the "Local Copy" property of the reference to the dll
in question in the VS project for the application? If it is True try setting
it to False.

Hope this helps
Martin
"Lenard Gunda" <fr****@fbi.h u> wrote in message
news:uH******** ******@TK2MSFTN GP15.phx.gbl...
Hi!

I haved created a rendered custom control, placed it in a class library
(DLL), assigned a strong name and installed in the GAC. I also have other
utilities, that are in class libraries, and are in the GAC. All of these

are
used from my webpage, and my webpage references them, and they also
reference one another.

I add all references of the DLLs to the project, compile and run the
project.

Now everything is accessed from the GAC (I mean my class libraries),
however, if a copy of that one single class library that has the custom
control is not in the application bin\ folder, then the page refuses to
load. It complains at the @Register directive, saying and cannot load this
one assembly, and lists me paths, where it wanted to find it. It doesn't
list the GAC, however.

When I copy this particular .DLL to the application bin\ folder, the
application works ok When I check what DLLs the aspnet_wp process has
loaded, however, I have to see, that even this DLL is used from the GAC.
Somehow, it's just it requires it to start the application when it is
accessed, but then it still uses the version from the GAC.

Is this a bug on ASP.NET, or am I doing something wrong?

Thanks

Lenard


Nov 18 '05 #3
Hi,

1. remove your custom control from your webpage.
2. in the references, set local copy (of your custom control) to false
3. add your custom control to the gac
4. restart visual studio.net
5. drag your custom control to your web page
Nov 18 '05 #4
That worked and I can see now why it wasn't working before.
The Register directive was not specifying the Version and PublicKeyToken in
the Assembly attribute. After following the steps that you specified, it
does.

Thanks.

"Nicola Dompierre" wrote:
Hi,

1. remove your custom control from your webpage.
2. in the references, set local copy (of your custom control) to false
3. add your custom control to the gac
4. restart visual studio.net
5. drag your custom control to your web page

Nov 18 '05 #5

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

Similar topics

7
2977
by: Shimon Sim | last post by:
I have a custom composite control I have following property
6
2658
by: Suzanne | last post by:
Hi all, I really hope someone out there can help me as I've been tearing my hair out on this one for a good while and I'm getting really frustrated now! My problem is this - my custom controls periodically disappear from my project when I build it. First of I get the message about a missing dependency, then if I rebuild after that - the...
2
2572
by: Suzanne | last post by:
Hi all, I'm reposting this message as I'm experiencing this problem more and more frequently : I really hope someone out there can help me as I've been tearing my hair out on this one for a good while and I'm getting really frustrated now! My problem is this - my custom controls periodically disappear from my
2
1857
by: J R M | last post by:
I've developed a custom control (it's basically a drop-down list and then a couple of textboxes to include meta-data for the selection) that I'm embedding into another custom control (the idea is to allow a dynamic number of control1 to appear in control2). Everything renders correctly, however I could never retrieve data on postback from my...
6
11061
by: | last post by:
I have made some user controls with custom properties. I can set those properties on instances of my user controls, and I have programmed my user control to do useful visual things in response to how those properties are set. I want to be able to do two other things: a) add User control instances to my page, filling in the place of...
15
6492
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt accept other controls. The control i drag drop on it becomes the child of my custom control's parent form and not the child of my custom control. Then...
1
1972
by: rizwanahmed24 | last post by:
Hello i have created a custom control. i have placed two template controls on it. One is check box and second is picture box. The custom control also contain two picture boxes as property. These picture boxes can be filled at design time. I want my custom control to act as container. I drag the controls from toolbox on my custom control....
2
1427
by: Ron | last post by:
I would like some more information on custom controls, what they can do and things like that, what you would use them for etc... Can anyone here share some examples of what you have used a custom control for and possibly email a zip file with that control so I could run it in a program to see how it worked? to pts4560 <atyahoo.com ? ...
1
2172
by: Abdo Haji-Ali | last post by:
Previously I used to create user controls if I wanted to use a specific set of controls in multiple pages, however I want to deploy my control in other applications so I thought of creating custom controls. Only problem is that I'm used to designing my controls in a WYSIWYG (tm) way (i.e. using the designer and writing HTML tags). The only...
5
4095
by: gerry | last post by:
I am trying to create a custom container control that will only ever contain a specific type of control. At design time, when a control of a different type is added to the container I would like to wrap the control in the proper control type - which is also a container. At design time I want to be able to turn this : <my:container>...
0
7700
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
8125
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7676
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
6284
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
5513
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
5219
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
3653
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
3642
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1221
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.