I use ASP.NET Webforms and Entity Framework 4 and this is my .edmx
file screenshot because I don't know what code to post here:
And this is my connection string in my web.config file:
<add name="tebimir_db_tebimEntities"
connectionString="metadata=res://*/DataAccessLayer.tebimir_db_tebim.csdl|res://*/DataAccessLayer.tebimir_db_tebim.ssdl|res://*/DataAccessLayer.tebimir_db_tebim.msl;provider=System.Data.SqlClient;provider connection string="data source=tebim.ir,9993;initial catalog=tebimir_db_tebim;persist security info=True;user id=tebimir_dbadmin;password=qwerty*2607548;MultipleActiveResultSets=True;App=EntityFramework""
providerName="System.Data.EntityClient" />
My .edmx
file in inside a folder named DataAccessLayer
. When I use Entity Framework, it works fine and there is no problem but ONLY when I create an entityDataSource
control and want to assign my .edmx
to it, I get an error that the metadata could not be found, otherwise it works correctly.
I mean I can access data using Entity Framework. I checked all the questions related in stack-overflow but could not find an answer. Please help.
These are additional information in case it can help you:
First of all, you will not face this issue on VS 2012. This is Visual Studio 2013 specific issue and I was able to reproduce it. Here is the solution:
Now you can point your entityDataSource
control to this edmx through Configure Data Source wizard without error. See the note in the ".edmx file properties" section of below link:
https://msdn.microsoft.com/en-us/library/cc982042%28v=vs.100%29.aspx?f=255&MSPPError=-2147217396
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With