Click here to Skip to main content
15,890,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hello everybody,

I just uploaded my website today but I got a problem with connection string, the code was working 100% in local server but I want to put on the server.


but the error is with the entity framework connection string.

this is the error:
C#
System.ArgumentException: Format of the initialization string does not conform to specification starting at index 99.



I tried this code :
C#
<add name="DefaultConnection" connectionString="Data Source=servername;Initial Catalog=SA_Quran_DB;Integrated Security=False;User ID=SA_Quran_DB;Connect Timeout=15;Encrypt=False;Packet Size=4096;Password=SA_QU_pobme^%$876;" providerName="System.Data.SqlClient" />

<add name="QuranDBEntities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=servername;Initial Catalog=SA_Quran_DB;Integrated Security=False;User ID=SA_Quran_DB;Connect Timeout=15;Encrypt=False;Packet Size=4096;Password=SA_QU_pobme^%$876;" providerName="System.Data.EntityClient" />



I don't know what exactly the mistake and what should I do.

P.S. I hide the server name in Data Source for security reasons but I add it correctly

What I have tried:

I tried to create the connection as I mention before but still no connection
Posted
Comments
Richard Deeming 22-Apr-16 9:46am    
Shouldn't that second connection string have an &quot;; at the end?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900