4
connectionString="AttachDbFilename=C:\Documents and Settings\nmartin\My Documents\PS_Upload\TimeTrack\src\TimeTracker\TimeTrack\App_Data\ASPNETDB.MDF;Integrated Security=True; User Instance=True"
     providerName="System.Data.SqlClient" />

This is the connection string that is provided to me from the Server Explorer for my local MDF file. I keep receiving the following error when attempting to run the application.

"Format of the initialization string does not conform to specification starting at index 25."

Anyone know what this is?

Thanks!

4 Answers 4

2

Thanks a lot everyone. My problem was actually with the connection string I was providing NHibernate configuration. It would appear that the local data file path should not be wrapped in 's or "s. Thanks for the replies.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, single quotes (') was my problem too.
2

I'd say it is the spaces in file name. Try enclosing it in '' e.g.

connectionString="AttachDbFilename='C:\Documents and Settings\nmartin\My Documents\PS_Upload\TimeTrack\src\TimeTracker\TimeTrack\App_Data\ASPNETDB.MDF';Integrated Security=True; User Instance=True"

or copy it to c:\ for a test

Comments

1

Try replacing: Integrated Security=True

With: Trusted_Connection=Yes

Comments

0

Have you tried using escape characters on the backslashes?

connectionString="AttachDbFilename=C:\Documents and Settings\nmartin\My Documents\PS_Upload\TimeTrack\src\TimeTracker\TimeTrack\App_Data\ASPNETDB.MDF;Integrated Security=True; User Instance=True"
 providerName="System.Data.SqlClient" />

becomes

connectionString="AttachDbFilename=C:\\Documents and Settings\\nmartin\\My Documents\\PS_Upload\\TimeTrack\\src\\TimeTracker\\TimeTrack\\App_Data\\ASPNETDB.MDF;Integrated Security=True; User Instance=True"
 providerName="System.Data.SqlClient" />

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.