473,403 Members | 2,323 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,403 software developers and data experts.

Problem loading strongly named assembly within ASP.NET app

Hi,

I have an ASP.NET Web Application which uses a number of controls in an
external strongly named assembly.

Whenever I view a page that uses one of the controls within the strongly
named assembly a FileLoadException is thrown, saying that "The located
assembly's manifest definition with name 'CentaurNet.Web.Controls' does not
match the assembly reference".

Here's the most relevant stuff from the stack trace:

=== Pre-bind state information ===
LOG: DisplayName = Company.Web.Controls, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null
(Fully-specified)
LOG: Appbase = file:///C:/WEB/Sites/NewDesignPartners/1.0.0
LOG: Initial PrivatePath = bin
Calling assembly : e0chcp-a, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null.
===

LOG: Policy not being applied to reference at this time (private, custom,
partial, or location-based assembly bind).
LOG: Post-policy reference: Company.Web.Controls, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/sites_testsite_1.0.0/c5ac8176/c4508797/Company.Web.Controls.DLL.
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/sites_testsite_1.0.0/c5ac8176/c4508797/Company.Web.Controls/Company.Web.Controls.DLL.
LOG: Attempting download of new URL
file:///C:/WEB/Sites/TestSite/1.0.0/bin/Company.Web.Controls.DLL.
WRN: Comparing the assembly name resulted in the mismatch: PUBLIC KEY TOKEN

The public key remains the same between builds, and the assembly copied to
the web project directory during VS's build process is the same.

The really bizarre thing is that the control does appear to get loaded ok,
the control is also used on the error page and this loads fine -- I can even
break into the debugger and the control is initialised as it should,
properties are set correctly etc.

Any suggestions would be welcome,
Paul
Nov 19 '05 #1
2 2132
Hi Paul,

We have reviewed this issue and are currently researching on it. We will
update you ASAP. Thanks for your patience!

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 19 '05 #2
Hi Paul,

From your description, you have a strong-named assembly which contains some
custom webcontrols. Now, you used it in one of your asp.net web
applications and put in the private bin dir, but at runtime, you'll get
error said that the assembly's strong-named keytoken is mismatch with the
application assembly's metadata manifest, yes?

BAsed on my experience, the problem is likely due to the location of the
strong-named assembly. Different from normal .net application, the ASP.NET
application doesn't support strong-named assembly in private bin path,
that'll cause some unexpected errors(there is some known issue on
strong-named assembly in private bin path). So all the strong-named
assembly that used in ASP.NET app need to be put into GAC.
So currently my suggestion is :
1. use the ILDASM to open the custom control assenmbly and your web
application assembly(which referene that control assembly) to see whether
the public key token info in their assembly manifest are identical.

2. If #1 is ok, then move that strong-named assembly from private bin path
to GAC and restart your application(recycle iis) and test again.

Hope helps. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)




Nov 19 '05 #3

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

Similar topics

4
by: Tamir Khason | last post by:
I have a form. On form there is my control (all of control's assemblies signed by strong key), BUT while running I recieve he located assembly 'MyFooAssembly' is not strongly named. While...
1
by: San | last post by:
Hi, Why strongly named assembly can refer other strongly named assembly ? Thanks with Regards, San.
5
by: Oleg Subachev | last post by:
When I try to use strongly named assembly1 that references non-strongly named assembly2 I get the following error: "The located assembly '<assembly2 name>' is not strongly named." How can I...
13
by: Lee Newson | last post by:
Hi, I have just written my first application using VB.NET. The app works fine when i am running it within .NET for debugging purposes, however when i try to run the app from the .exe file that...
0
by: john | last post by:
The changes to asp.net makes it very difficult for us to migrate one of our web projects to 2.0 and makes deployments more difficult for us. It seems that the new Asp.net model is only designed...
1
by: Tim F | last post by:
Problem: I'm receiving the error "File or assembly name XXXXX or one of its dependencies, was not found." when trying to execute code in an assmebly that has both a strong-name and has been...
5
by: Harold Howe | last post by:
I am having a problem deserializing objects from a library when the following conditions exist: 1- The library is strongly named 2- The serialized file was created with version 1.0 of the...
0
by: MC-Advantica | last post by:
I have built a managed wrapper class and assembly that expose much functionality available in unmanaged legacy DLLs. I can write VB apps that interface with the managed assembly, and the managed...
0
by: Dave Burns | last post by:
Hi, I have a C++ managed assembly (.dll) which links to a bunch of native libraries. Everything works fine if I don't make the managed assembly a strongly named one. Once I make it a strongly...
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: 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
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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:
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.