This project is read-only.

Database connection error

Topics: Developer Forum
May 21, 2008 at 2:13 PM
Edited May 21, 2008 at 2:15 PM
Hi,

I try to connect to my local sql2005 and get this error: The given key was not present in the dictionary. 

Using:
<add name="N2CMS" connectionString="Server=(local);Database=DATABASENAME;User Id=LOGINNAME;Password=PASSWORD;Network Library=DBMSSOCN;"/>
or
<add name="N2CMS" connectionString="Server=(local);Database=N2_Templates;Integrated Security=SSPI"/>
- I am using the the templates sampel
- Database is created and connecting to it with the username and password works
Any help on this
May 21, 2008 at 2:26 PM
Hi golbol

I had the same problem as you:
http://www.codeplex.com/n2/Thread/View.aspx?ThreadId=27912

Seems to be a problem with the new version of NHibernate.

/Carsten
May 21, 2008 at 2:49 PM
Edited May 21, 2008 at 3:38 PM

Thanks,  If I jump to the step 3 and create tables etc it works fine but I get a simple startpage on my site. I want to restore the mdf file to get all data to my own database. I made a backup file from the mdf file and restore the backup file into my database, everything is fine so far but when I go to my site I get this error. Is there any way to do this. What I want is just to move data to a new database on my local sql2005 server. The example site then should work as it does when working with mdf file connection.

/Alex

May 21, 2008 at 4:07 PM
There is another option that may work for you. You can export all items (select root node, click on the box-ish icon in the toolbar) and select your export file in the installation process (step 4).