开发者

Unity configuration problem

开发者 https://www.devze.com 2022-12-21 09:30 出处:网络
I\'m currently have a Could not load ExternalIdentityProvider when i tried to run my ioc class container = new UnityContainer();

I'm currently have a Could not load ExternalIdentityProvider when i tried to run my ioc class

container = new UnityContainer();
UnityConfigurationSection unitySection = ConfigurationManager.GetSection(unitySectionName) as UnityConfigurationSection;
unitySection.Containers.Default.Configure(container);

Could not load type 'ExternalIdentityProvider' from assembly 'Microsoft.Practices.Unity.Configuration, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

This is my unity configuration:

  <!-- User-defined type aliases -->

  <!--Repositories interfaces-->
  <typeAlias alias="ICrudeVideoRepository"
           type="DalCore.Repository.ICrudeVideoRepository, DalCore" />

  <!--Repositories Classes-->
  <typeAlias alias="CrudeVideoSqlRepository"
             type="SqlServerDAL.Repository.CrudeVideoSqlRepository, SqlServerDAL" />

</typeAliases>

<containers>
  <container>
    <types>

      <!--Repositories Maps-->
      <type type="ICrudeVideoRepository" mapTo="CrudeVideoSqlRepository" />
        </typeConfig>
      &开发者_运维知识库lt;/type>
    </types>
  </container>
</containers>


How are you authenticating people?

Looking at the code, above, Unity is upset because it can't find "ExternalIdentityProvider". This has nothing to do with your own DAL classes.

At a guess I'd say you're trying to use an external identity mechanism (Yahoo, Google, Facebook, etc) to validate the users identity and I suspect it's referenced directly in the Unity config. Unity tries to resolve every class you have in your configuration file when you load it, so if you don't have a that file in your bin or referenced in your project then you will get a Unity error.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号