0

[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=&quot;data source=DESKTOP-4LGULR3\ROOT;initial catalog=Cafeteria_POS;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" 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()
tereško
  • 58,060
  • 25
  • 98
  • 150
  • please check if you modify your entity data model then you must have to modify your connection string too. Please see this : https://stackoverflow.com/questions/18351898/system-data-metadataexception-unable-to-load-the-specified-metadata-resource – Manektech Knowledge Base Mar 25 '22 at 06:01
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Mar 25 '22 at 09:35
  • @ManektechKnowledgeBase Thank you. I checked the connection string, the problem was the name; it wasn't MODEL, was MODELS. Thank you! – Abraham Maltez Mar 26 '22 at 23:43

0 Answers0