2010-12-03 12 views
1

Ich benutze Mindspace.Lightspeed in meiner C# Desktop-Anwendung zum ersten Mal, aber ich bekomme Fehler und kann keine Verbindung zur Datenbank herstellen. alt textMindscape.LightSpeed ​​Datenbank Verbindungsproblem

Meine App.config enthält den folgenden Code:

<?xml version="1.0" encoding="utf-8" ?><configuration> 
<configSections> 
<section name="lightSpeedContext" type="Mindscape.LightSpeed.Configuration.LightSpeedConfigurationSection,Mindscape.LightSpeed" /></configSections><connectionStrings> 
<add name="DefectsConStr" connectionString="Data Source=.\sqlexpress2k5;Initial Catalog=Defects;Persist Security Info=True;User ID=sa;Password=123" 
    providerName="System.Data.SqlClient" /></connectionStrings> <lightSpeedContext> 
<add name="Development" connectionStringName="DefectsConStr" dataProvider="SqlServer2005"/> </lightSpeedContext> </configuration> 

Antwort

2

ich es geschafft haben, Ihr Problem zu reproduzieren, müssen Sie Ihre Konfigurationsdatei ändern, so dass der Abschnitt Name

lightSpeedContexts ist und nicht lightSpeedContext

siehe meine Konfigurationsdatei

<?xml version="1.0"?> 
<configuration> 
    <configSections> 
    <section name="lightSpeedContexts" type="Mindscape.LightSpeed.Configuration.LightSpeedConfigurationSection,Mindscape.LightSpeed"/> 
    </configSections> 
    <connectionStrings> 
    <add name="Blog" connectionString="Data Source=Blog.dat"/> 
    </connectionStrings> 
    <lightSpeedContexts> 
    <add name="Blog" connectionStringName="Blog" dataProvider="SQLite3" identityMethod="KeyTable" pluralizeTableNames="false"/> 
    </lightSpeedContexts> 
</configuration> 
Verwandte Themen