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

Replacing strong-named assembly

Hi,

I have an application that consists of multiple strong-named assemblies
like:

App.exe references Utils.dll (for simplicities sake)

All assemblies are strong-named, but not GAC'd (private assemblies).

My goal is that once I have deployed App.exe, I want to deploy a bugfix
in Utils.dll and redeploy this dependent assembly _without_ redeploying
App.exe.

Let's assume the interface of the types in Utils.dll have not changed.
I thought that I could redeploy my new strong-named Utils.dll along
with an codebase directive in App.exe.config redirecting to the new
assembly to use (and ignore the old one). E.g:

<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Utils"
publicKeyToken="f6a8ba1bc21a01be"/>
<codeBase version="1.0.2081.19103" href="file://c:/program
files/myapp/hotfix/20050909/Utils.dll"/.
</dependentAssembly>
</assemblyBinding>
</runtime>
<configuration>

I don't get this to work. The error message I get is:

"The located assembly's manifest definition with name 'Utils' does not
match the assembly reference."

Quite frankly I'm not sure if redirecting assembly bindings work at all
for strong-named assemblies or only work for weakly-named assemblies.

Can anyone help me out here?
Thanks
-Stefan

Nov 19 '05 #1
4 2309
asp.net does not support codebase directives.

-- bruce (sqlwork.com)

"Stefan" <Cl*********@gmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Hi,

I have an application that consists of multiple strong-named assemblies
like:

App.exe references Utils.dll (for simplicities sake)

All assemblies are strong-named, but not GAC'd (private assemblies).

My goal is that once I have deployed App.exe, I want to deploy a bugfix
in Utils.dll and redeploy this dependent assembly _without_ redeploying
App.exe.

Let's assume the interface of the types in Utils.dll have not changed.
I thought that I could redeploy my new strong-named Utils.dll along
with an codebase directive in App.exe.config redirecting to the new
assembly to use (and ignore the old one). E.g:

<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Utils"
publicKeyToken="f6a8ba1bc21a01be"/>
<codeBase version="1.0.2081.19103" href="file://c:/program
files/myapp/hotfix/20050909/Utils.dll"/.
</dependentAssembly>
</assemblyBinding>
</runtime>
<configuration>

I don't get this to work. The error message I get is:

"The located assembly's manifest definition with name 'Utils' does not
match the assembly reference."

Quite frankly I'm not sure if redirecting assembly bindings work at all
for strong-named assemblies or only work for weakly-named assemblies.

Can anyone help me out here?
Thanks
-Stefan

Nov 19 '05 #2
Does it support bindingRedirect?

Nov 19 '05 #3
i believe so, but there can only be one version of the dll in the bin
folder. the .net model is to just drop the updated dll into the bin folder,
and the site reloads with the new code, while current requests run with the
old dll. asp.net copies the bin folder to a shadow directory (which the code
actually runs from), so that the dll will not be in use.

also unless you are worried about malious updates of your dll, there is no
need for strong names either.

-- bruce (sqlwork.com)
"Stefan" <Cl*********@gmail.com> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...
Does it support bindingRedirect?

Nov 19 '05 #4
Thanks, Bruce. I got it working with bindingRedirect.

The shadow copying happens after the dependency has been resolved
(which is when the bindingRedirect comes into play)

And yes, without the strongnaming everything would be much simpler by
just copying the assemblies
in the bin folder. But there is no way around for me to not strong-name
the assemblies
(since they are also used in other scenarios other than asp.net apps
which require strong-naming).

Nov 19 '05 #5

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

Similar topics

3
by: DrewM | last post by:
I'm sure this isn't difficult, but it's Friday afternoon (!). I'm trying to use a regular expression to match html tags in a string and convert them to lower case. It's the RegExp object that I'm...
129
by: Torbjørn Pettersen | last post by:
I've started cleaning up my HTML and implementing CSS. So far I've used FrontPage, but am switching over to DreamWeaver. Reading a bit on W3Schools.com and W3.org I see there are a lot of HTML...
1
by: Andrew Poulos | last post by:
Say I have a page, which has been created by a third party, and the page may contain some pre-specified text. How can I find and replace that text dynamically? For example, if the page I have...
2
by: Terry | last post by:
Hi, Using javascript, I would like to replace the contents of a DIV with new, arbitrary HTML markup. I want to write a W3C-compliant function for doing so; it would look something like this: ...
4
by: miroslaw.rusin | last post by:
Hi mates! :) The challange is like this: how to replace only one element in the whole tree to something else? Example: Input: <?xml version="1.0"?> <html>
1
by: godrifle | last post by:
I hope this is the best way to explain what I'm trying to do, using PHP5. Given the following HTML sample... <html><head><title>The Page</title></head> <body> <h2>A Title</h2> <img...
1
by: cma6 | last post by:
I have a page which uses tables for layout http://www.vintagetextile.com/1920s_to_1930s.htm The checkerboard pattern is achieved with this markup: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML...
3
by: Oltmans | last post by:
Hi, I'm new to Python (and admittedly not a very good programmer) and I've come across a scenario where I've to search and replace text in a file. For the sake of an example, I'm searching...
12
by: Jens | last post by:
Hi everyone, I'm trying to build a simple dropdown menu for a website and i need to need a way to retrieve the top and left style attributes of an object. However it seems style attributes like...
1
by: TamusJRoyce | last post by:
I have xsl code which I was hoping could be used to replace one specific tag from an xhtml document and output another xhtml document. xsl has phenomenal potential in data replacing, but coming...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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?
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...

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.