views:

21

answers:

1

I built this app with Web Developer Express 2010 using SQL Server Express 2008. I downloaded mdf/log files from my server to my local and attached them as a database with SQL 2005 compatibility.

I'm now trying to publish to my production server. The server is using SQL Express 2005 and Windows Server Web. I tried to change out the web.config connectionstring, but I'm getting an "Unable to load the specified metadata resource" error. I 'm also a newbie/hack.

Here's a look at my production string:

<add name="ProductionEntities" connectionString="metadata=res://*/Production.csdl|res://*/Production.ssdl|res://*/Production.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=Production\SQLEXPRESS;Initial Catalog=ProductionCatalog;Integrated Security=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient"/>

Here's a look at my dev string:

<add name="DevelopmentEntities" connectionString="metadata=res://*/Models.Development.csdl|res://*/Models.Development.ssdl|res://*/Models.Development.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=Development\SQLEXPRESS;Initial Catalog=DevelopmentCatalog;Integrated Security=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" /></connectionStrings>

I'm hoping someone can help point me in the right direction. Thanks, I love you guys -Joe

A: 

The metadata portion of your production connection string should not be different than the development connection string. The res: prefix means that the entity famework will be looking for CSDL, SSDL, and MSDL files in resources that are baked into the binary assemblies that you're deploying. These resource files are generate from your edmx file and they don't change between debug and release builds. So just copy the meta data portion of the connection string from development to production.

Paul Keister
Thanks Paul. Being the newb/hack that I am when my provider string was incorrect I started messing with the metadata, which is why I got the error. Putting it back to the way it was showed me that my user/pass were incorrect.Thanks for helping.
MrGrigg