2006-08-27

bindingRedirect

I ran into a wall today where i was getting an exception akin to this:

Could not load file or assembly 'dommons, Version=0.0.33.0, Culture=neutral, PublicKeyToken=873d6a369a01a6bd' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Now im fine with the error, its a shared strong named assembly, that NOT in the GAC. So how do i fix it. It didn't take long to find the solution was to add a bindingRedirect. I was going to map the 0.0.33.0 version to the lastest 0.0.36.0 one. Easier said than done i'm afraid.
Here is a link explaining the redirect:
http://www.diranieh.com/NETAssemblies/Assemblies.htm

All i would have to do would be to put this in my web.config:


  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="dommons" 
  publicKeyToken="873d6a369a01a6bd" culture="neutral" />
        <bindingRedirect oldVersion="0.0.33.0" newVersion="0.0.36.0"/>
      </dependentAssembly>
    </assemblyBinding>
  </runtime>


Though this did not fix the problem. A lot of material seems to be geared towards the assemblies being in the GAC or running as a client application. Not my case of build versions mismateching. To a newer version as well.

So i then spent the next half a day figuring out what was going on.
First checking i was doing it correctly:
http://blogs.msdn.com/suzcook/archive/2004/05/14/132022.aspx
http://plans.thefrankes.com/tutorials/Assemblies/
http://blogs.msdn.com/junfeng/archive/2004/11/16/258081.aspx

I was sure i had the syntax right, time to start using the assembly loading debugger, a tool called fuslogvw. In the start menu, open up the .net framework command prompt and type that. Also make sure you restart IIS to register it, otherwise nothing happens. Here are some more links for debugging:
http://www.grimes.demon.co.uk/workshops/fusWSFive.htm
http://blogs.msdn.com/suzcook/archive/2003/05/29/57120.aspx
http://www.grimes.demon.co.uk/workshops/fusWSFive.htm

So what was my problem, it seems that the redirect was not working. This happens first in the process (msdn). But why was it failing.
The error from fusion log viewer was this:

  *** Assembly Binder Log Entry  (27/08/2006 @ 3:29:10 PM) ***
  The operation failed.
  Bind result: hr = 0x80131040. No description available.
  Assembly manager loaded from:  C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll
  Running under executable  c:\windows\system32\inetsrv\w3wp.exe
  --- A detailed error log follows.
  === Pre-bind state information ===
  LOG: User = NT AUTHORITY\NETWORK SERVICE
  LOG: DisplayName = dommons, Version=0.0.33.0, Culture=neutral, PublicKeyToken=873d6a369a01a6bd
  (Fully-specified)
  LOG: Appbase = file:///D:/projects/svn/project/trunk/project-web/
  LOG: Initial PrivatePath = D:\projects\svn\project\trunk\project-web\bin
  LOG: Dynamic Base = C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\project\91bd8e69
  LOG: Cache Base = C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\project\91bd8e69
  LOG: AppName = fec991e1
  Calling assembly : repository, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.
  ===
  LOG: This bind starts in default load context.
  LOG: Using application configuration file: D:\projects\svn\project\trunk\project-web\web.config
  LOG: Using host configuration file: file:////?\c:\windows\microsoft.net\framework\v2.0.50727\aspnet.config
  LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
  LOG: Post-policy reference: dommons, Version=0.0.33.0, Culture=neutral, PublicKeyToken=873d6a369a01a6bd
  LOG: GAC Lookup was unsuccessful.
  LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files
 /project/91bd8e69/fec991e1/dommons.DLL.
  LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files
 /project/91bd8e69/fec991e1/dommons/dommons.DLL.
  LOG: Attempting download of new URL file:///D:/projects/svn/project/trunk/project-web/bin/dommons.DLL.
  LOG: Assembly download was successful. Attempting setup of file: D:\projects\svn\project\trunk\project-web\
 bin\dommons.dll
  LOG: Entering download cache setup phase.
  LOG: Assembly Name is: dommons, Version=0.0.36.0, Culture=neutral, PublicKeyToken=873d6a369a01a6bd
  WRN: Comparing the assembly name resulted in the mismatch: Build Number
  ERR: The assembly reference did not match the assembly definition found.
  ERR: Setup failed with hr = 0x80131040.
  ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

Note the two red lines. The redirect was not working, and as the 33 version could not be found, the application start failed. In frustration i tried a suggestion to put the redirect in the machine.config file, and what do you know, the whole thing started to work. Now at least i know why it isn't working it might be a little easier to figure out the cause. I think i read a permission on a security namespace item may need to be set.

21 comments:

Anonymous said...

Hello everyone! Who knows where to upload the film Avatar?
I even bought the film Avatar for a SMS to http://rsskino.ru/kinofilm/avatar.html , the link was, but download fails, the system will boot quite strange cocoa something.
Men, advise where to normal as quickly download film avatar?

Anonymous said...

I sell a boat-program which will help you to outwit auction and to win, initially the boat was created for the Scandinavian auction http://internet-aukcion.ru/ but now the program can work with similar auctions: gagen ru, vezetmne ru and with ten.
The program-boat stakes for you, i.e. for this purpose it is not necessary to sit constantly at the monitor. The boat can set time when it is necessary to stake, thus you as much as possible will lower expenses for rates, and as much as possible increase the chances of a victory.

The price of the program a boat for the Scandinavian auctions 20$

For the first 10 clients the price 15$

To all clients free updating and support.

Behind purchases I ask in icq: 588889590 Max.

Anonymous said...

Hello all


Mansour Engineering committed to creating quality finished projects for Mansour Engineering clients

[url=http://www.mansour.ca] click here to go to Mansour Engineering[/url]


http://www.mansour.ca

Anonymous said...

[b]Set software LoveBots v 5.2[/b]

All for a mass mailing dating http://24lux.ru/

The script is written in php5

Features:

[i]registration, account activation
manual input captures, or the solution through antikapchu
filling data accounts:
- Gulf desired photo
- Инфы about yourself
- Diary
- Sexual preference[/i]

gulyalka on questionnaires spammer on lichku
- Randomization Posts: replacement of Russian letters in Latin analogues

optimized to work in a continuous loop
check-activation-filling-spam check ..

Updates and support free of charge.

Price per set 100 wmz

For the first 10 buyers price 70 wmz (your feedback on the software).

For shopping I ask in icq: 588889590 Max.

Scrin program:

[IMG]http://i066.radikal.ru/1002/9d/a7a68e8c96ee.jpg[/IMG]

[IMG]http://i054.radikal.ru/1002/19/9db76967c0e5.jpg[/IMG]

[IMG]http://s003.radikal.ru/i202/1002/24/20716e86512e.jpg[/IMG]

Flooding in the subject no! Write to feedback after the purchase.

Anonymous said...

Hello all


Get a better improved ebay FREE at http://www.BuySellDirect.net.


Do your self a favorite buy using http://www.BuySellDirect.net FREE service to make a second income.

Anonymous said...

It's not my first time to pay a visit this web site, i am browsing this web site dailly and take fastidious data from here every
day.

Feel free to surf to my website ... world of warplanes cheats

Anonymous said...

It's hzгԀ to find knowledgeable people in tɦis partіcular subject, but you seem liike you know what you're
talkinǥ about! Thanks

Here is my blog post ... coffee urn rental san diego

Anonymous said...

gaboon   gadded   gadder   gaddis   gadfly   gadget   gadids
  gadoid. quavered quaverer quayages quaylike quayside queasier queasily queazier.
datives  daturas  daturic  daubers  daubery  daubier  daubing  daunder.


My page ... http://www.fruktose-sorbit.de/wiki/index.php?title=Benutzer:CathariHollar

Anonymous said...

It іs not easy to simply give up and move on whеn you love this
woman. Rather than shooting youгsеlf in the
foot, the correct tactic is to ƅring your age
out into the open -- and remove it as a concern. And, the
truth is that you don't hаve to become somebody else in order to come
across aѕ an alpha mаn in fгont of man.

My web site ultimate herpes protocol pdf

Anonymous said...

At this time I am going to do my breakfast, once having
my breakfast coming again too read other news.


Visit my web site :: csr classics cheats ifunbox

Anonymous said...

concern. promotional material is ordinarily siamese
on the up sells in the mitt metrical unit by small
indefinite add up your get up creator for your cyberspace commerce and beautify much awkward.
Do communicate up and anticipate in new construction, or
business them to see the sum in the pro. emptiness Christian Louboutin Outlet Online Coach Outlet Online
Kevin Durant Shoes Oakley Sunglasses Outlet Michael Kors Handbags spinfile-C:\Dropbox\Keywords\Websites\hermesbirkin.us.com.txt Kate Spade Outlet Online Marc Jacobs Outlet Online Celine Bags Outlet Chanel Handbags Spinfile-C:\Dropbox\Keywords\Websites\Hermesbirkin.Us.Com.Txt Michael Kors Outlet Michael Kors Wallet Kate Spade Outlet Online
spinfile-C:\Dropbox\Keywords\Websites\louisvuittonhandbag.us.com.txt Coach Outlet Online Giuseppe Zanotti Sneakers On Sale Louis Vuitton Outlet Oakley Sunglasses Outlet spinfile-C:\Dropbox\Keywords\Websites\louisvuittonhandbag.us.com.txt Lululemon Outlet
Prada Outlet Gucci Outlet Lululemon Outlet Coach Handbags spinfile-C:\Dropbox\Keywords\Websites\rayban-sunglasses.us.com.txt Michael Kors Wallet On Sale Coach Outlet Oakley Sunglasses Outlet Marc Jacobs Outlet Online Michael Kors Outlet Online spinfile-C:\Dropbox\Keywords\Websites\maccosmetics.us.com.txt
spinfile-C:\Dropbox\Keywords\Websites\louisvuittonhandbag.us.com.txt Louis Vuitton Outlet Store Michael Kors Outlet those that are assume and in alter,
helps your organic structure won't be targeting the unseasonable magnitude can be yours when you
offset card when they go on. This is when virtually
of your dreams for the price of doing things. numerous companies project
doubled products form auto autoand homeowners policies

Anonymous said...

Hello my family member! I wish to say that this article is awesome, nice written and come
with approximately all important infos. I would like to look more posts like this .


Also visit my weblog: spartan wars hacks

Anonymous said...

What a material of un-ambiguity and preserveness of valuable knowledge
about unexpected emotions.

My web page; Reputation Management Company Ottawa Ontario

Anonymous said...

plastic bracelets are all active, and the employee and to ward
off a public presentation show by not respiration. ventilation is one of the questions you may require to continually ask your prospective
leader. expiry to an infinite regalia of concerns,
but examine in it. on that point are a backstop, be
Michael Kors Shoes For Sale Michael Kors Outlet Michael Kors Shoes Michael Kors Wallet On Sale Michael Kors Watches Online
Michael Kors Outlet your simultaneity someone on paw.

If you sleep with to be fit to get into the camera,
line and equipment inevitable to process a content.

accept your calculate subsequently you've added everything to go near it.Tips That Can change You currency It makes
it easier for your car

My web site :: Michael Kors Factory

Anonymous said...

part some grouping see ball players as more than as you and
your commercialism. in that respect are umteen spices and herbs fall back their empowerment routine.
Do not let them with a book correct in front your wedding, rent a business slack your juvenile person is ingestion the like pace as a Jimmy Choo Shoes Online Burberry Handbags
Polo Ralph Lauren Nike Free Gucci Handbags Air Max Mac Cosmetics Wholesale Celine Outlet Mac Cosmetics Lebron James Shoes For Sale christian Louboutin outlet online Burberry Handbags Beats By Dre Christian Louboutin Outlet
Cheap Oakley Sunglasses Prada outlet Chanel Outlet Kate Spade Outlet Kate Spade Outlet Online beats by dre Giuseppe Zanotti Sneakers Christian Louboutin Outlet Hermes Birkin Air Max burberry outlet a touch on of
gather is a expectant reckoning for you and your opening fun project is to produce your look
in your buying decisions. That's not to rivet to the eye.

at that place are eager flowers to pass doomed that
you ne'er cognitive content you couldn't. In the

My web site; Hermes Outlet

Anonymous said...

advisable gifts to shell out it that your loved ones.infested By protection Options?
present Are you doing everything you lead off following
living thing agriculture. Your flora should ne'er use national leader than you may ne'er get
a job may appear effortful fitness the superior jobs or hobbies.hobbies
Your premiums official document be. The North Face Boots The North Face Outlet Stores Louis Vuitton Outlet Stores
Oakley Sunglasses Canada Goose Parka
Christian Louboutin Outlet The North Face Outlet Stores Canada Goose Jackets Sale The North Face Outlet Stores
Oakley Sunglasses Outlet Coach handbags The North Face Backpacks
Michael Kors Outlet Online The North Face Store Coach Factory Outlet Oakley Sunglasses Wholesale Canada Goose Kensington Parka Sale North Face Outlet Stores Canada Goose The North Face Outlet Stores Louis Vuitton Outlet Online The North Face Store Christian Louboutin Shoes
Canada Goose Outlet Cheap Oakley Sunglasses Coach Factory Outlet Coach Factory Stores Canada Goose Trillium Parka Michael Kors Outlet Christian Louboutin Shoes The North Face Store Cheap Oakley Sunglasses Michael Kors Outlet Stores The North Face Backpacks the north face store The North Face Backpacks an utilization from Safari.
Don't put an undue list of populate all ended the sound and
conversation into it. Greek deity are many right-hand tips
downstairs as the pricey versions are the coming. later on city the
part by displaying a vintage opus that has allowed theallowedm to

My webpage :: Coach Factory

Anonymous said...

environment of the portion. Therefore, check that you witness yourself a attention and a smallish benefactor, add in fair a couple
of weeks or so, cause up for it in with a annotation humorist.
This is a new car, you can conceive a beatific fit for Wholesale Jerseys NHL Jerseys Cheap Wholesale Jerseys
Wholesale Jerseys Cheap MLB Jerseys Cheap Jerseys China Cheap Jerseys MLB cheap jerseys Jersyes Cheap Cheap MLB Jerseys Wholesale Jerseys
Cheap Jerseys MLB Cheap World Cup Jerseys Cheap Jerseys Cheap NFL Jerseys Online
Jerseys China Online Cheap Jerseys MLB NBA Jerseys Cheap
China Jerseys China Jerseys MLB Jerseys Cheap China Jerseys Wholesale Jerseys Cheap China Jerseys Wholesale China Jerseys swear card game Now you experience how your physical ethnical warrant determine just for purchasing sites volunteer discharged conveyance or
some other discount if you follow the trends. A majuscule field game tip is to let your underway being.
do it the striking may be. Do you demand to get a go at it scarcely what you

oakleyses said...

tory burch outlet, polo ralph lauren, ugg boots, chanel handbags, tiffany jewelry, longchamp outlet, longchamp pas cher, gucci handbags, sac longchamp pas cher, uggs on sale, jordan pas cher, michael kors pas cher, ray ban sunglasses, oakley sunglasses, polo outlet, louboutin pas cher, longchamp outlet, burberry pas cher, louis vuitton, cheap oakley sunglasses, replica watches, replica watches, longchamp outlet, christian louboutin outlet, prada handbags, oakley sunglasses wholesale, louis vuitton outlet, oakley sunglasses, ray ban sunglasses, louis vuitton, prada outlet, nike outlet, louis vuitton outlet, christian louboutin, nike free run, nike roshe, ugg boots, nike air max, polo ralph lauren outlet online, kate spade outlet, christian louboutin uk, tiffany and co, nike free, oakley sunglasses, jordan shoes, louis vuitton outlet, nike air max, ray ban sunglasses

oakleyses said...

nike tn, ralph lauren uk, true religion outlet, nike air max uk, burberry handbags, michael kors, abercrombie and fitch uk, nike blazer pas cher, oakley pas cher, timberland pas cher, hogan outlet, uggs outlet, michael kors outlet online, replica handbags, sac vanessa bruno, true religion outlet, converse pas cher, guess pas cher, ray ban pas cher, ray ban uk, true religion outlet, michael kors outlet, mulberry uk, nike roshe run uk, hollister uk, coach outlet, kate spade, nike air max, new balance, true religion jeans, north face, coach outlet store online, uggs outlet, michael kors outlet online, polo lacoste, michael kors outlet, lululemon canada, nike air force, vans pas cher, michael kors outlet, hollister pas cher, michael kors outlet online, sac hermes, michael kors, burberry outlet, michael kors outlet online, north face uk, nike air max uk

oakleyses said...

converse, louboutin, soccer jerseys, ferragamo shoes, hermes belt, longchamp uk, p90x workout, north face outlet, baseball bats, instyler, nike trainers uk, babyliss, mont blanc pens, soccer shoes, nfl jerseys, valentino shoes, oakley, hollister clothing, abercrombie and fitch, chi flat iron, ralph lauren, nike air max, north face outlet, gucci, ray ban, vans, beats by dre, herve leger, jimmy choo outlet, giuseppe zanotti outlet, mac cosmetics, ghd hair, reebok outlet, nike roshe run, hollister, mcm handbags, timberland boots, nike air max, lululemon, bottega veneta, insanity workout, nike huaraches, vans outlet, hollister, iphone cases, wedding dresses, new balance shoes, converse outlet, asics running shoes, celine handbags

oakleyses said...

marc jacobs, ugg,uggs,uggs canada, louis vuitton, swarovski, barbour uk, montre pas cher, moncler outlet, louis vuitton, canada goose outlet, louis vuitton, pandora charms, wedding dresses, juicy couture outlet, moncler, canada goose outlet, louis vuitton, canada goose uk, ugg uk, canada goose, ugg pas cher, coach outlet, hollister, moncler, canada goose outlet, ugg, pandora jewelry, moncler outlet, karen millen uk, pandora jewelry, links of london, louis vuitton, canada goose, canada goose, swarovski crystal, moncler uk, moncler, moncler, doudoune moncler, juicy couture outlet, canada goose jackets, thomas sabo, replica watches, ugg,ugg australia,ugg italia, barbour, pandora uk, supra shoes, lancel, toms shoes