Unable to load the specified metadata resource.

Dec 10, 2010 at 9:56 PM

Server Error in '/' Application.

Unable to load the specified metadata resource.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.MetadataException: Unable to load the specified metadata resource.

Source Error:

Line 45:         }
Line 46: 
Line 47:         public Database(string connectionString) :
Line 48:             base(System.Configuration.ConfigurationManager.ConnectionStrings["KiGGSqlServer"].ConnectionString, _defaultContainerName)
Line 49:         {   


Source File: C:\projects\DigEth\Kigg-3a9b436eace5\Kigg_3a9b436eace5\Source\EntityFramework\Repository\Database\Database.cs    Line: 47

Stack Trace:

[MetadataException: Unable to load the specified metadata resource.]
   System.Data.Metadata.Edm.MetadataArtifactLoaderCompositeResource.LoadResources(String assemblyName, String resourceName, ICollection`1 uriRegistry, MetadataArtifactAssemblyResolver resolver) +3542846
   System.Data.Metadata.Edm.MetadataArtifactLoaderCompositeResource.CreateResourceLoader(String path, ExtensionCheck extensionCheck, String validExtension, ICollection`1 uriRegistry, MetadataArtifactAssemblyResolver resolver) +185
   System.Data.Metadata.Edm.MetadataArtifactLoader.Create(String path, ExtensionCheck extensionCheck, String validExtension, ICollection`1 uriRegistry, MetadataArtifactAssemblyResolver resolver) +63
   System.Data.EntityClient.EntityConnection.SplitPaths(String paths) +659
   System.Data.EntityClient.EntityConnection.GetMetadataWorkspace(Boolean initializeAllCollections) +148
   System.Data.Objects.ObjectContext.RetrieveMetadataWorkspaceFromConnection() +26
   System.Data.Objects.ObjectContext..ctor(EntityConnection connection, Boolean isConnectionConstructor) +172
   System.Data.Objects.ObjectContext..ctor(String connectionString, String defaultContainerName) +27
   Kigg.EF.Repository.Database..ctor(String connectionString) in C:\projects\DigEth\Kigg-3a9b436eace5\Kigg_3a9b436eace5\Source\EntityFramework\Repository\Database\Database.cs:47
   Kigg.EF.Repository.DatabaseFactory.Create() in C:\projects\DigEth\Kigg-3a9b436eace5\Kigg_3a9b436eace5\Source\EntityFramework\Repository\Database\DatabaseFactory.cs:35
   Kigg.EF.Repository.BaseRepository`2..ctor(IDatabaseFactory factory) in C:\projects\DigEth\Kigg-3a9b436eace5\Kigg_3a9b436eace5\Source\EntityFramework\Repository\BaseRepository.cs:23
   Kigg.EF.Repository.UserRepository..ctor(IDatabaseFactory factory) in C:\projects\DigEth\Kigg-3a9b436eace5\Kigg_3a9b436eace5\Source\EntityFramework\Repository\UserRepository.cs:18
   BuildUp_Kigg.EF.Repository.UserRepository(IBuilderContext ) +306
   Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(IBuilderContext context) +12
   Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context) +191
   Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context) +97

[BuildFailedException: The current build operation (build key Build Key[Kigg.EF.Repository.UserRepository, EntityFramework]) failed: Unable to load the specified metadata resource. (Strategy type BuildPlanStrategy, index 3)]
   Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context) +273
   Microsoft.Practices.Unity.ObjectBuilder.NamedTypeDependencyResolverPolicy.Resolve(IBuilderContext context) +107
   BuildUp_Kigg.Repository.LoggingUserRepository(IBuilderContext ) +228

[InvalidOperationException: The parameter innerRepository could not be resolved when attempting to call constructor Kigg.Repository.LoggingUserRepository(Kigg.Repository.IUserRepository innerRepository).]
   Microsoft.Practices.ObjectBuilder2.DynamicMethodConstructorStrategy.ThrowForResolutionFailed(Exception inner, String parameterName, String constructorSignature, IBuilderContext context) +140
   BuildUp_Kigg.Repository.LoggingUserRepository(IBuilderContext ) +327
   Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(IBuilderContext context) +12
   Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context) +191
   Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context) +97

[BuildFailedException: The current build operation (build key Build Key[Kigg.Repository.LoggingUserRepository, Logging]) failed: The parameter innerRepository could not be resolved when attempting to call constructor Kigg.Repository.LoggingUserRepository(Kigg.Repository.IUserRepository innerRepository). (Strategy type BuildPlanStrategy, index 3)]
   Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context) +273
   Microsoft.Practices.Unity.ObjectBuilder.NamedTypeDependencyResolverPolicy.Resolve(IBuilderContext context) +107
   BuildUp_Kigg.Repository.CachingUserRepository(IBuilderContext ) +231

[InvalidOperationException: The parameter innerRepository could not be resolved when attempting to call constructor Kigg.Repository.CachingUserRepository(Kigg.Repository.IUserRepository innerRepository, System.Int32 noOfUsersCacheCount, System.Single usersCacheDurationInMinutes, System.Single userCacheDurationInMinutes).]
   Microsoft.Practices.ObjectBuilder2.DynamicMethodConstructorStrategy.ThrowForResolutionFailed(Exception inner, String parameterName, String constructorSignature, IBuilderContext context) +140
   BuildUp_Kigg.Repository.CachingUserRepository(IBuilderContext ) +765
   Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(IBuilderContext context) +12
   Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context) +191
   Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context) +97

[BuildFailedException: The current build operation (build key Build Key[Kigg.Repository.CachingUserRepository, null]) failed: The parameter innerRepository could not be resolved when attempting to call constructor Kigg.Repository.CachingUserRepository(Kigg.Repository.IUserRepository innerRepository, System.Int32 noOfUsersCacheCount, System.Single usersCacheDurationInMinutes, System.Single userCacheDurationInMinutes). (Strategy type BuildPlanStrategy, index 3)]
   Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context) +273
   Microsoft.Practices.Unity.ObjectBuilder.NamedTypeDependencyResolverPolicy.Resolve(IBuilderContext context) +107
   BuildUp_Kigg.Infrastructure.CreateDefaultUsers(IBuilderContext ) +329

[InvalidOperationException: The parameter userRepository could not be resolved when attempting to call constructor Kigg.Infrastructure.CreateDefaultUsers(Kigg.DomainObjects.IDomainObjectFactory factory, Kigg.Repository.IUserRepository userRepository, Kigg.Infrastructure.DefaultUser[] users).]
   Microsoft.Practices.ObjectBuilder2.DynamicMethodConstructorStrategy.ThrowForResolutionFailed(Exception inner, String parameterName, String constructorSignature, IBuilderContext context) +140
   BuildUp_Kigg.Infrastructure.CreateDefaultUsers(IBuilderContext ) +571
   Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(IBuilderContext context) +12
   Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context) +191
   Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context) +97

[BuildFailedException: The current build operation (build key Build Key[Kigg.Infrastructure.CreateDefaultUsers, createDefaultUsers]) failed: The parameter userRepository could not be resolved when attempting to call constructor Kigg.Infrastructure.CreateDefaultUsers(Kigg.DomainObjects.IDomainObjectFactory factory, Kigg.Repository.IUserRepository userRepository, Kigg.Infrastructure.DefaultUser[] users). (Strategy type BuildPlanStrategy, index 3)]
   Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context) +273
   Microsoft.Practices.ObjectBuilder2.Builder.BuildUp(IReadWriteLocator locator, ILifetimeContainer lifetime, IPolicyList policies, IStrategyChain strategies, Object buildKey, Object existing) +59
   Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name) +152

[ResolutionFailedException: Resolution of the dependency failed, type = "Kigg.Infrastructure.IBootstrapperTask", name = "createDefaultUsers". Exception message is: The current build operation (build key Build Key[Kigg.Infrastructure.CreateDefaultUsers, createDefaultUsers]) failed: The parameter userRepository could not be resolved when attempting to call constructor Kigg.Infrastructure.CreateDefaultUsers(Kigg.DomainObjects.IDomainObjectFactory factory, Kigg.Repository.IUserRepository userRepository, Kigg.Infrastructure.DefaultUser[] users). (Strategy type BuildPlanStrategy, index 3)]
   Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name) +190
   Microsoft.Practices.Unity.UnityContainer.Resolve(Type t, String name) +11
   Microsoft.Practices.Unity.<ResolveAll>d__4.MoveNext() +207
   Microsoft.Practices.Unity.<ResolveAll>d__0`1.MoveNext() +135
   Kigg.EnumerableExtension.ForEach(IEnumerable`1 enumerable, Action`1 action) in C:\projects\DigEth\Kigg-3a9b436eace5\Kigg_3a9b436eace5\Source\Core\Extension\EnumerableExtension.cs:12
   Kigg.Infrastructure.Bootstrapper.Run() in C:\projects\DigEth\Kigg-3a9b436eace5\Kigg_3a9b436eace5\Source\Core\Infrastructure\Bootstrapper\Bootstrapper.cs:21
   Kigg.Web.GlobalApplication.OnStart() in C:\projects\DigEth\Kigg-3a9b436eace5\Kigg_3a9b436eace5\Source\Web\Global.asax.cs:11
   Kigg.Web.GlobalApplication.Application_Start() in C:\projects\DigEth\Kigg-3a9b436eace5\Kigg_3a9b436eace5\Source\Web\Global.asax.cs:23