MetadataException: Unable to load the specified metadata resource

Muncul error MetadataException: Unable to load the specified metadata resource. Penyebabnya adalah kesalahan pada connection string. Sejauh ini ada 2 syntax untuk connection string:

<add name=”UserManagementConnection” connectionString=”Data Source=CHANDRA-PC;Initial Catalog=user_management;Integrated Security=True” providerName=”System.Data.SqlClient” />

<add name=”UserManagementConnection” connectionString=”metadata=res://*/Entities.Model1.csdl|res://*/Entities.Model1.ssdl|res://*/Entities.Model1.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=.;initial catalog=user_management;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;” providerName=”System.Data.EntityClient” />

Error muncul jika kita menggunakan connection string ke-2. Solusinya mengganti Model1 sesuai dengan nama EDMX. Lebih mudah menggunakan connection string ke-1 saja.

http://stackoverflow.com/questions/689355/metadataexception-unable-to-load-the-specified-metadata-resource

Chandra Oemaryadi has written 244 articles

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>