New Posts New Posts RSS Feed: connection string
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

connection string

 Post Reply Post Reply
Author
erturkcevik View Drop Down
Groupie
Groupie


Joined: 14-Jun-2007
Location: Turkey
Posts: 40
Post Options Post Options   Quote erturkcevik Quote  Post ReplyReply Direct Link To This Post Topic: connection string
    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;
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 740
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post 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...")
 
Back to Top
erturkcevik View Drop Down
Groupie
Groupie


Joined: 14-Jun-2007
Location: Turkey
Posts: 40
Post Options Post Options   Quote erturkcevik Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 740
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 04-Jan-2011 at 10:28am
Can you provide the contents of your App.config?
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 740
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post 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"?>
Back to Top
erturkcevik View Drop Down
Groupie
Groupie


Joined: 14-Jun-2007
Location: Turkey
Posts: 40
Post Options Post Options   Quote erturkcevik Quote  Post ReplyReply Direct Link To This Post 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>

Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 740
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post 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)
 
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 740
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 20-Mar-2011 at 1:26pm
Hi erturkcevik,
It looks like this issue is related to a mixup when uppercasing 'ı' and/or 'i'.
Silvio.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down