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

I have uploaded a new website on server, but when i try to run it on web-browser i am getting this error

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

What is the cause of issue & how to resolve it? I didn't got this error before


Asked by:- manish
: 3464 At:- 8/9/2017 7:31:23 AM
C# web-config format-of-string

1 Answers
profileImage Answered by:- vikas_jk

You need to check your connection string in Web.Config File, basically it is throwing an error because of connection string format is not correct.

SQL Server Connection string formats

Standard Security

Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;

Trusted Connection


Connection to a SQL Server instance

The server/instance name syntax used in the server option is the same for all SQL Server connection strings.

Server=myServerName\myInstanceName;Database=myDataBase;User Id=myUsername;

It should resolve your issue.

Or Check if You are updating the database using Code-first(Update-Database command ) if you have selected the correct project(Entity framework project) in NuGet package manager console or not, if not Nuget may be looking in at the web.config file of that startup or any other project.

At:- 8/9/2017 7:42:07 AM
Good answer, thanks, i see there was an issue with my connection string, which is resolved now 0
By : manish - at :- 8/18/2017 12:19:47 PM

Login/Register to answer
Register directly by posting answer/details

Full Name *

Email *

By posting your answer you agree on privacy policy & terms of use

Subscribe Now

Subscribe to our weekly Newsletter & Keep getting latest article/questions in your inbox weekly