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 6359749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:33:37+00:00 2026-05-24T23:33:37+00:00

I have an api, MyApi, which is consumed by an application, MyApplication. MyApi has

  • 0

I have an api, MyApi, which is consumed by an application, MyApplication.

MyApi has several dlls targeted to the .NET 4.0 Client Profile. For example:

  • MyApi.Core
  • MyApi.Domain
  • MyApi.Providers

(and some more)

For deployment simplicity, these are ILMerged into

  • MyApi.ClientProfile

All of the MyApis dlls are strong named.

All the projects in MyApplication reference MyApi.ClientProfile.

I’m now adding some web functionality into MyApi, so I’ve added a dll MyApi.Web, which is targeted to the .NET 4.0 Extended Profile. MyApi.Web references MyApi.Core and MyApi.Domain (as well as System.Web dlls).

There is now also a MyApplication.Web project. It references some other projects in MyApplication (which have references to the MyApi.ClientProfile dll). The MyApplication.Web project needs to reference MyApi.Web dll.

How can I do this?

If I add references to MyApi.Core and MyApi.Domain from MyApplication.Web, then there will be types that exists in multiple assemblies for MyApplication.Web.

If I don’t add references to MyApi.Core and MyApi.Domain from MyApplication.Web, MyApi.Web will fail to load because it can’t find MyApi.Core or MyApi.Domain (because only MyApi.ClientProfile is present).

I can’t handle the assembly resolve event and redirect requests for MyApi.Core/MyApi.Domain to MyApi.ClientProfile because the MyApi assemblies are all strong named and that will make it fail.

I can’t merge MyApi.Web into the MyApi.ClientProfile because MyApi.ClientProfile should be supported for the .NET 4.0 Client Profile (and MyApi.Web has references to System.Web, etc.).

If I change MyApi.Web to reference MyApi.ClientProfile, that should work for this one case, but isn’t ideal, because it won’t work for another application references MyApi.Core and MyApi.Domain directly.

I don’t want to force MyApplication.Web to specify bypassTrustedAppStrongNames in its config (thought enabling this setting somehow from MyApi.Web directly might be an acceptable option….).

So, I’m stuck thinking of a suitable/elegant solution to this problem.

Any suggestions?

Thanks.

  • 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-24T23:33:38+00:00Added an answer on May 24, 2026 at 11:33 pm

    I came to a realization:

    If your assemblies have the same Public Key Token, you can do redirection and the name doesn’t matter.

    So, because MyApi.Client profile is signed with the same key as MyApi.Core, if I handle AssemblyResolve in MyApi.Web, I actually CAN tell it to use MyApi.ClientProfile instead of MyApi.Core.

    I would have thought it would throw a strong name verification error. It does not….because the public keys are the same.

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

Sidebar

Related Questions

i have application in which i have a web server api .this is my
I have an MVC application, which has two areas - Administrator, and User. What
I have an API (a DLL) which has various methods that return objects /
I have an API consisting of ASP.NET webservices callable through GET/POST/SOAP. A new functionality
I have an API call in my application where I am checking the time
I have a scenario in which I have REST API which manages a Resource
I have an API which I am turning into an internal DSL. As such,
hi have a COM visible API in C# which looks like the following: public
I have the following API: public interface MyApi { /** * Performs some stuff.
I have successfully created a PHP REST API which resides on my server. I

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.