New Posts New Posts RSS Feed: EntityServerException
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

EntityServerException

 Post Reply Post Reply
Author
cjohnson84 View Drop Down
Groupie
Groupie


Joined: 24-Sep-2009
Location: Akron, Ohio
Posts: 44
Post Options Post Options   Quote cjohnson84 Quote  Post ReplyReply Direct Link To This Post Topic: EntityServerException
    Posted: 21-Apr-2010 at 5:40am
I am in the process of trying to update my application to use the DevForce 2010.  I am getting the following error in the callback routine from a call to ExecuteAsync
 
Key 'CMISENTITIES': Parameter 'connectionString' is not valid. String arguments cannot be empty.
Parameter name: connectionString Check that either a connectionStrings element or EdmKey is defined for this key in the configuration file, or implement a custom IDataSourceKeyResolver.
 
I'm assuming this means there is no connection string definition in my web.config file.  Previously the connectionstring was added automatically to the edmKey section of the web.config file as follows:
 
<edmKeys>

<edmKey name="Default" connection="metadata=res://OrianaHouse.CMIS.Data.DataModel.CMISModelEF/CMISModel.csdl|res://OrianaHouse.CMIS.Data.DataModel.CMISModelEF/CMISModel.ssdl|res://OrianaHouse.CMIS.Data.DataModel.CMISModelEF/CMISModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=UDSSRV1\UDSLAB1;Initial Catalog=CMIS;Persist Security Info=True;User ID=xxxxx;Password=xxxxx;MultipleActiveResultSets=True&quot;" containerName="OrianaHouse.CMIS.Data.DataModel.CMISEntities">

<probeAssemblyNames>

<probeAssemblyName name="OrianaHouse.CMIS.Data.DataModel.CMISModelDF"/>

<probeAssemblyName name="OrianaHouse.CMIS.Data.DataModel.CMISModelEF"/>

</probeAssemblyNames>

</edmKey>

</edmKeys>

How do I get this to automatically occur now or is this something I now need to do manually?
Back to Top
cjohnson84 View Drop Down
Groupie
Groupie


Joined: 24-Sep-2009
Location: Akron, Ohio
Posts: 44
Post Options Post Options   Quote cjohnson84 Quote  Post ReplyReply Direct Link To This Post Posted: 21-Apr-2010 at 6:00am
As a follow-up I've been doing some further investigation.  I have my database model in a separate assembly and so the connection string is placed in the App.Config file of that assembly.
Do I now need to copy that into the Web.Config file of my web project or shouldn't DevForce be able to find it in the separate assembly App.Config?
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 21-Apr-2010 at 10:06am
You'll need either an EdmKey or a <connectionStrings> entry for, in this case, 'CMISENTITIES' in your web.config.   So yes, you will need to copy the connection string from the app.config in your model project.
 
Unlike DF2009, DF2010 will not update config files from the model project at design/build time. 
 
At runtime only a single config file is used, in this case the web.config, so the information there must be correct.  (The app.config from your model project is not automatically copied along with the assembly during build.)  In non-ASP.NET/SL applications you can point DevForce to the config file to use by setting either the IdeaBladeConfig.ConfigFileLocation or IdeaBladeConfig.ConfigFileAssembly statics, but generally it's much more straightforward to have the ideablade.configuration in the same single config recognized by .NET as the application's configuration file.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down