Unity configuration problem
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.
精彩评论