locked
An abstract InjectionMemberElement object cannot be created. Please specify a concrete type RRS feed

  • Question

  • User572431586 posted

    Hi,

    I have a solution with multiple projects.

    I'm trying to publish one of the projects to a web app that are on an Azure domain, everything is working fine on localhost but on the published version I get:

    "An error occurred creating the configuration section handler for unity: An abstract InjectionMemberElement object cannot be created. Please specify a concrete type."

    Unity is defined in the web.config as:

    <configuration>
      <configSections>
               <section name="unity" type="Microsoft.Practices.Unity.Configuration.UnityConfigurationSection, Microsoft.Practices.Unity.Configuration" />
    </configSections>
    </configuration>

    ...

      <unity xmlns="http://schemas.microsoft.com/practices/2010/unity">
       ...
       </unity

    The project I'm trying to publish also have references to other projects.

    Any help what cause this error would be appreciated!

    Thursday, April 21, 2016 6:50 AM

Answers

  • User572431586 posted

    I solved it now by renaming the unity tags to "unityA" so I suspect that the IIS already has loaded unity from another referenced project in the solution.

    After the renaming it doesn't work locally cause it then can't find and load unity. But that's another issue... 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, April 21, 2016 7:48 AM