'System.Data.Entity.Core.MetadataException: 'Unable to load the specified metadata resource.' 2022
[Enter image description here] 1
I got this error when I tried to run the system. I am not sure why. it used to display the information from a database. Please check the image. My connection string is the following: I can figure out what is wrong. Please help. But on website it is not working.
<connectionStrings>
<add name="Cafeteria_POSEntities"
connectionString="metadata=res://*/Models.Cafeteria_POSModel.csdl|res://*/Models.Cafeteria_POSModel.ssdl|res://*/Models.Cafeteria_POSModel.msl;provider=System.Data.SqlClient;provider connection string="data source=DESKTOP-4LGULR3\ROOT;initial catalog=Cafeteria_POS;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
</connectionStrings>
System.Data.Entity.Core.MetadataException
HResult = 0x80131939
Message = Unable to load the specified metadata resource.
Source: EntityFramework
StackTrace:
system. Data Entity Core Metadata, MetadataArtifactLoaderCompositeResource LoadResources(String assemblyName, String resourceName, ICollection1 uriRegistry, MetadataArtifactAssemblyResolver, resolver)
system. Data Entity core. Metadata Edm. MetadataArtifactLoaderCompositeResource CreateResourceLoader(String path, ExtensionCheck extensionCheck, String validExtension, ICollection 1 uriRegistry, MetadataArtifactAssemblyResolver resolver)
System.Data.Entity.Core.Metadata.Edm.MetadataCache.SplitPaths (String paths)
at System.Data.Entity.Core.Common.Utils.Memoizer2.Result.GetValue()
system. Data.Entity.Core.Common.Utils. Memoizer2.Evaluate (TArg arg)
system. Data.Entity.Core.Metadata.Edm.MetadataCache. GetArtifactLoader (DbConnectionOptions, effectiveConnectionOptions)
system. Data.Entity.Core.Metadata.Edm.MetadataCache. GetMetadataWorkspace (DbConnectionOptions, effectiveConnectionOptions)
at System.Data.Entity.Core.EntityClient. EntityConnection GetMetadataWorkspace ()
system. Data.Entity.Core.Objects. ObjectContext..ctor (EntityConnection connection, Boolean isConnectionConstructor, ObjectQueryExecutionPlanFactory objectQueryExecutionPlanFactory, Translator translator, ColumnMapFactory columnMapFactory)
system. Data Entity Internal internal connection CreateObjectContextFromConnectionModel (
system. Data Entity Internal LazyInternalContext.InitializeContext()
system. Data Entity Internal.InternalContext.Initialize()
system. Data Entity Internal InternalContext GetEntitySetAndBaseTypeForType (Type entityType)
system. Data Entity Internal.Linq.InternalSet1.Initialize()
System.Data.Entity.Internal.Linq.InternalSet1.Include (String path)
System.Data.Entity.Infrastructure.DbQuery1.Include (String path)
system. Data Entity Queryable Extensions Include [T, TProperty] (IQueryable: 1 source, Expression: 1 path)
at POS.Datos. FacultyAdmin.Consultar() in C:UsersjosemDesktopCode POSPOSPOSDatos FacultyAdmin.cs: line 23
POS.Controllers: FacultyController.Index() in C:UsersjosemDesktopCode POSPOSPOSControllersAdministrators FacultyController.cs: line 17
at System.Web.Mvc.ControllerActionInvoker InvokeActionMethod (ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 parameters)
System.Web.Mvc.Async.AsyncControllerActionInvoker./> c. BeginInvokeSynchronousActionMethod b__9_0 (IAsyncResult asyncResult, ActionInvocation innerInvokeState)
System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult2.CallEndDelegate (IAsyncResult asyncResult)
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod (IAsyncResult asyncResult)
at System.Web.Mvc.Async. AsyncControllerActionInvoker AsyncInvocationWithFilters./> c__DisplayClass11_0. InvokeActionMethodFilterAsynchronouslyRecursive b__0()
at System.Web.Mvc.Async.AsyncControllerActionInvoker. AsyncInvocationWithFilters./> c__DisplayClass11_2. InvokeActionMethodFilterAsynchronouslyRecursive b__2()
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|