9
Answers

Connection String Problem

Photo of Mohit Kala

Mohit Kala

7y
316
1
Pls Help Me i deployed my mvc project using entity framework on somee.com but i got connection string runtime error

Answers (9)

2
Photo of Nilesh Shah
NA 22.3k 215.1k 7y
Your question does not have full details.
 
what error are you getting?
1
Photo of Nilesh Shah
NA 22.3k 215.1k 7y
Your connection string does not seem to be in correct format.
 
can you post your connection string?
1
Photo of Sivasankar Gorantla
NA 447 6k 7y
There might be a typo in your connection string. Please verify it. 
1
Photo of Mani Kandan
NA 2.6k 135.8k 7y
please Show us your error.
0
Photo of Satyaprakash Samantaray
NA 9.7k 1.1m 7y
put breakpoints and debug
0
Photo of Narinder Singh
NA 88 2k 7y
<connectionStrings>  
        <add name="connectionname" connectionString="Data Source=Desktop123;Initial Catalog=mydb;Persist Security Info=True;User ID=sa;Password=123"

providerName="System.Data.SqlClient" />

</connectionStrings>


0
Photo of Rajkiran Swain
NA 33.9k 373.6k 7y

Check your connection string. If you need help with it check Connection Strings, which has a list of commonly used ones.

Commonly used Connection Strings:

SQL Server 2012

Standard Security

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

Trusted Connection

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

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;

SQL Server 2005

Standard Security

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

Trusted Connection

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

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;

MySQL

Standard

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

Specifying TCP port

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

Oracle

Using TNS

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

Using integrated security

Data Source=TORCL;Integrated Security=SSPI;

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;
0
Photo of Mohit Kala
NA 132 2.2k 7y
error
 
0
Photo of Sundar
NA 9.6k 94.6k 7y
Try this. hope this will help 
 
https://stackoverflow.com/questions/26256988/determine-correct-connectionstring-for-web-publishing-for-asp-net-mvc-applicatio