PDA

View Full Version : حرفه ای: Metadata Connection String



میلاد رئیسی
پنج شنبه 23 مرداد 1393, 03:52 صبح
I am building a web application with ASP.NET and C#‎‎ using Visual Studio 2012. I want to connect a database in my DropDownList web control with Entity Framework. I created an ADO.NET Entity Data Model that I connected with my database. I then switched to design view and added an Entity Data Source in DropDownList but when am clicking on "choose data source" and selecting the name of the entity for the named connection am getting the following error:


The metadata specified in the connection string could not be loaded. Consider rebuilding the web project to build assemblies that may contain metadata. The following error(s) occurred:


Unable to load the specified metadata resource


My connection string:


<connectionStrings>
<add name="db_CmsEntities" connectionString="metadata=res://*/Model.csdl|res://*/Model.ssdl|res://*/Model.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=.;initial catalog=db_Cms;user id=sa;password=123456;MultipleActiveResultSets=Tru e;App=EntityFramework&quot;" providerName="System.Data.EntityClient" /></connectionStrings>