1

I'm using Mindspace.Lightspeed in my C# desktop application for the first time but I'm getting errors and unable to connect to database. alt text

My App.config contains the following 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>
si618
  • 16,580
  • 12
  • 67
  • 84
hotcoder
  • 3,176
  • 10
  • 58
  • 96

1 Answers1

2

I have managed to reproduce your problem, you need to change your configuration file so that the section name is

lightSpeedContexts and not lightSpeedContext

see my configuration file

<?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>
Rohan West
  • 9,262
  • 3
  • 37
  • 64