Print Page | Close Window

connection string

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2410
Printed Date: 29-Jul-2026 at 7:32pm


Topic: connection string
Posted By: erturkcevik
Subject: connection string
Date Posted: 30-Dec-2010 at 10:50pm

Key 'NORTHWINDIBENTITIES': The connection string for Key 'NORTHWINDIBENTITIES' was not found or is invalid.
Check that either a connectionStrings element or EdmKey is defined for this key in the configuration file, or implement a custom IDataSourceKeyResolver.

Platform : Win7 Turkish, SQLExpress 2008, VS 2010

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

 
Redards;



Replies:
Posted By: sbelini
Date Posted: 03-Jan-2011 at 3:39pm
Hi erturkcevik,
 
Are you running 2-tier or n-tier? Where is the connectionString above located? (App.config or Web.config?)
 
Can you update your model with no problems or are you sent to the Data Connection selection screen if you try to do so? (to update you model, open your edmx file, right click anywhere in the white area and select "Update Model from Database...")
 


Posted By: erturkcevik
Date Posted: 03-Jan-2011 at 10:36pm
I'm running 2 Tier, and updated model from database, but I give same  error message.
 
error message include 'NORTHWINDİBENTİTİES' turkish charecter.
 
Key 'NORTHWINDİBENTİTİES': The connection string for Key 'NORTHWINDİBENTİTİES' was not found or is invalid.
Check that either a connectionStrings element or EdmKey is defined for this key in the configuration file, or implement a custom IDataSourceKeyResolver.


Regards


Posted By: sbelini
Date Posted: 04-Jan-2011 at 10:28am
Can you provide the contents of your App.config?


Posted By: sbelini
Date Posted: 04-Jan-2011 at 3:44pm
Or even better, before sending the App.config file, check and ensure it's using the proper encoding.
 
i.e. you might have
 
<?xml version="1.0" encoding="utf-8"?>
 
when in fact you should have
 
<?xml version="1.0" encoding="utf-16"?>


Posted By: erturkcevik
Date Posted: 05-Jan-2011 at 9:27am
I have change <?xml version="1.0" encoding="utf-16"?> but I give same error message
 
App.config
----------------------------
 
<?xml version="1.0" encoding="utf-8"?>

<configuration>

<configSections>

<section name="ideablade.configuration" type="IdeaBlade.Core.Configuration.IdeaBladeSection, IdeaBlade.Core" />

</configSections>

<connectionStrings>

<add name="NorthwindIBEntities"

connectionString="metadata=.\NorthwindIB.csdl|.\NorthwindIB.ssdl|.\NorthwindIB.msl;

provider=System.Data.SqlClient;provider connection string='Data Source=CERTURK\SQLEXPRESS;

Initial Catalog=NorthwindIB;Integrated Security=True;Connection Timeout=60;

multipleactiveresultsets=true'" providerName="System.Data.EntityClient" />

</connectionStrings>

<ideablade.configuration version="6.00" xmlns="http://schemas.ideablade.com/2010/IdeaBladeConfig">

<logging logFile="DebugLog.xml" />

</ideablade.configuration>

</configuration>



Posted By: sbelini
Date Posted: 18-Jan-2011 at 10:31am
erturkcevik,
 
You mentioned that the error message includes Turkish characters, but your app.config does not.
 
If you take a look at the App.config file of your model (yes, your model's, not the application's App.config) you can chech and confirm that the connection string there matches the connection string in the App.config of your application. The connection string in the App.config of the model is automatically generated given the information you provided when creating your model, or later if you modified the model properties.
 
On a second note, I have created connection strings several using non-english characters and they all worked fine with the exception of Turkish characters. I have not found if there is something missing, but also have not found any documentation stating that Turkish characters are not supported in Visual Studio.
 
I suggest you first try not using Turkish characters, so we can eliminate that as a cause for not being able to connect. You can modify the DataSource key (as well as EntityManager Name, Entity Container Name, etc) in the properties of your edmx. (open your edmx file, right-click anywhere in the white area, and select Properties)
 


Posted By: sbelini
Date Posted: 20-Mar-2011 at 1:26pm
Hi erturkcevik,
It looks like this issue is related to a mixup when uppercasing 'ı' and/or 'i'.
You can find details at http://www.ideablade.com/forum/forum_posts.asp?TID=2570&PID=10217#10217 - http://www.ideablade.com/forum/forum_posts.asp?TID=2570&PID=10217#10217
Silvio.



Print Page | Close Window