473,396 Members | 1,707 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,396 software developers and data experts.

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 1567
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.hu> wrote in message
news:uH**************@TK2MSFTNGP15.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.hu> wrote in message
news:uH**************@TK2MSFTNGP15.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
by: Shimon Sim | last post by:
I have a custom composite control I have following property
6
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...
2
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...
2
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...
6
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...
15
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...
1
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...
2
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...
1
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...
5
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
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
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,...

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.