Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6843797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:17:44+00:00 2026-05-27T00:17:44+00:00

I am working on a web-based application using asp.net 4.0. I have some dlls

  • 0

I am working on a web-based application using asp.net 4.0.

I have some dlls I am using in the GAC that have some embedded dependencies on older dlls.

I have Configured the assemblies so that the dependency redirects to the correct version of the dll on my machine. This works perfectly in a 3.5 or lower version application, however, when I try to build an asp.net 4.0 application based on the same dlls, it chokes with an error like:

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

where my version of ControlReferencedByMyDll is version 2.0.1.0.

I could not find a GAC configuration utility for .net 4.0, but in my machine.config (In both the Framework and Framework64 folders for .net 4.0) I have added something like:

<runtime>
  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
      <assemblyIdentity name="ControlReferencedByMyDll" PublicKeyToken="XXXXXXXXXXXXXXXX"/>
      <bindingRedirect oldVersion="1.0.0.0-9.9.9.9" newVersion="2.0.1.0"/>
    </dependentAssembly>
  </assemblyBinding>
</runtime>

to see if that was the problem.

I’ve even tried to add the appliesTo=”v2.0.50727″ attribute to the assemblyBinding to see if it made a difference.

but it does not seem to have.

Has anyone else had this problem? and more importantly, can anyone help me solve this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T00:17:45+00:00Added an answer on May 27, 2026 at 12:17 am

    Okay, I haven’t seen any additional feedback, and at this point, I have not determined if/where the .config file is being overridden between machine.config and web.config, but this is what works.

    I add code similar to the following:

    <runtime>
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <dependentAssembly>
          <assemblyIdentity name="ControlReferencedByMyDll" PublicKeyToken="XXXXXXXXXXXXXXXX"/>
          <bindingRedirect oldVersion="1.0.0.0-9.9.9.9" newVersion="2.0.1.0"/>
        </dependentAssembly>
      </assemblyBinding>
    </runtime>
    

    Directly to my web.config file.

    I am submitting this as an answer to my own question, but as indicated before, if you happen to know a better way, or know what’s causing the disconnect between machine.config and web.config, please share.

    Thank you

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The context I have an Asp .Net web application with some pages that inherit
I am working with a Web application, based on Asp.Net 3.5 and WSS 3.0
Here's what i have : ASP.NET 4.0 Web Application Forms Authentication (Cookie Based) Here's
I have a multiple web sits asp.net application. In this application different domains using
At my work we have an existing ASP.NET web application and are duplicating some
I'm working on a web-based application that is intended to have at least a
I am working on a web application (ASP.NET) game that would consist of a
I am working on a web application (ASP.NET 3.5/C#) based on a legacy application
I'm working on a Wicket-based web application. In the application there are buttons that
I've just started working on a brownfield ASP.NET 2.0 Web Application. As with a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.