Programmers learn & share
0 votes
68 views

Problem :

I am new to ASP.Net  and I have an ASP.Net application which runs correctly on my local development machine.

But when I try to run this application online, it shows me following error

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

 I don’t have any clue about this error. Does anybody have any idea regarding solution on this error?

by (7.5k points)   | 68 views

1 Answer

0 votes

Solution :

To resolve this issue please check your connection string. If you need any further help with it then please check Connection Strings, which has the list of commonly used ones.

Please find below the commonly used Connection Strings:

1.    SQL Server 2012

a.      Standard Security

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

 

b.      Trusted Connection

    Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;

 

c.       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;Password=myPassword;

2.    SQL Server 2005

a.      Standard Security

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

b.      Trusted Connection

    Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;

c.       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;Password=myPassword;

3.    MySQL

a.      Standard

                    Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;

b.      Specifying TCP port

                    Server=myServerAddress;Port=1234;Database=myDataBase;Uid=myUsername;Pwd=myPassword;

 

4.    Oracle

a.      Using TNS

Data Source=TORCL;User Id=myUsername;Password=myPassword;

b.      Using integrated security

Data Source=TORCL;Integrated Security=SSPI;

c.       Using ODP.NET without tnsnames.ora

Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=MyOracleSID)));User Id=myUsername;Password=myPassword;

by (36.1k points)  
2,227 questions
2,734 answers
59 comments
241 users