Exception caused by the connection string of the ADO. Net object framework: Unable to load the specified metadata Resource

Source: Internet
Author: User

In the project, use unity as the IOC to concatenate the entire project and integrate WCF and ADO. NET Entity Framework, initially showed that unity could not construct the object. After being ruled out, it was found that ADO was used. the following exception occurs when the NET Entity Framework constructs the application: Unable to load the specified metadata resource.
Exception information:
System. Data. metadataexception was unhandled
Message = "unable to load the specified metadata resource ."
Source = "system. Data. Entity"
Stacktrace:
At system. Data. Metadata. EDM. metadataartifactloadercompositeresource. loadresources (string assemblyname, string resourcename, icollection '1 uriregistry, metadataartifactassemblyresolver resolver)
At system. Data. Metadata. EDM. Metadata. createresourceloader (string path, extensioncheck, string validextension, icollection '1 uriregistry, metadataartifactassemblyresolver resolver)
At system. Data. Metadata. EDM. metadataartifactloader. Create (string path, extensioncheck, string validextension, icollection '1 uriregistry, metadataartifactassemblyresolver resolver)
At system. Data. entityclient. entityconnection. splitpaths (string paths)
At system. Data. entityclient. entityconnection. getmetadataworkspace (Boolean initializeallcollections)
At system. Data. entityclient. entityconnection. initializemetadata (dbconnection newconnection, dbconnection originalconnection, Boolean closeoriginalconnectiononfailure)
At system. Data. entityclient. entityconnection. open ()
Throw an exception-unable to load the specified metadata resource. After checking, the problem occurs in the app. config configuration file (this configuration file is used in ADO. NET Entity Data Model wizard automatically added), when moving the EDM file location will modify the app. the connection string information in config. Therefore, when moving the EDM file, remember to update the database connection string information.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.