3

I have the following connection string in Web.config:

<add name="CTRS2Entities" connectionString="metadata=res://*/Edmx.CTRS2.csdl|res://*/Edmx.CTRS2.ssdl|res://*/Edmx.CTRS2.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=SYS2-PC;Initial Catalog=CTRS2;user id=**;password=***;Integrated Security=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />

It runs fine in deveopment mode. However, when I deploy it to IIS, I get the following error:

Format of initialization string does not conform to specification starting at index 0.
  • I think the answer is in the SO.Please refer to [this](http://stackoverflow.com/questions/5219676/format-of-the-initialization-string-does-not-conform-to-specification-starting-a) – diyoda_ Dec 22 '12 at 16:16

1 Answers1

0

Replace the &quot; values in your connection string with single quotes and you're golden.

See: Keyword not supported: "data source" initializing Entity Framework Context

Community
  • 1
  • 1
Howie
  • 2,760
  • 6
  • 32
  • 60