|
|
MSSQL
Started by Methael at 04-16-2008 2:50 PM. Topic has 3 replies.
 
 
|
|
Sort Posts:
|
|
|
|
04-16-2008, 2:50 PM
|
Methael
Joined on 04-16-2008
Posts 2
|
|
|
I am new to asp.net and dont know well how to correctly configure and establish a connection to database.<br><br>
I recive currently the error "An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)"
<br><br>
as connection string in my web.config i have :
<br><br>
add name="LocalSqlServer" connectionString="Data Source=sql392.mysite4now.com;Initial Catalog=MethaelsPlayground;Integrated Security=True;uid=xxx;pwd=xxx" providerName="System.Data.SqlClient" <br><br>
would be great is someone could help out here
|
|
|
|
|
Report
|
|
|
|
05-27-2008, 12:50 AM
|
deanman
Joined on 04-11-2007
Posts 177
|
|
|
The problem is that you have used the connection string for the SQL Express version!
Try the ones below.
connectionStrings
add name="SiteSqlServer" connectionString="Server=sql392.mysite4now.com;Database='The name of your data base';uid='DB User ID';pwd='DB password';" providerName="System.Data.SqlClient"
appSettings
add key="SiteSqlServer" value="Server=sql392.mysite4now.com;Database='The name of your data base';uid='DB User ID';pwd=''DB password'';"
I <3 WebHost4Life.com
|
|
|
|
|
Report
|
|
|
|
05-27-2008, 1:11 AM
|
admin
Joined on 08-10-2005
Posts 226
|
|
|
Get rid of ;Integrated Security=True in your connection string and that should fix it.
|
|
|
|
|
Report
|
|
|
|
05-27-2008, 1:29 AM
|
deanman
Joined on 04-11-2007
Posts 177
|
|
|
<BLOCKQUOTE><table width="85%"><tr><td class="txt4"><img src="/Themes/default/images/icon-quote.gif"> <strong>admin wrote:</strong></td></tr><tr><td class="quoteTable"><table width="100%"><tr><td width="100%" valign="top" class="txt4">
Get rid of ;Integrated Security=True in your connection string and that should fix it.<br>
</td></tr></table></td></tr></table></BLOCKQUOTE>
Well, 'LocalSqlServer' has to be renamed to 'SiteSqlServer' as well. ;)
I <3 WebHost4Life.com
|
|
|
|
|
Report
|
|
|
|
|
Webhost4life Fo... » Database Relate... » MSSQL » connectionString
|
|
|
|