Friday, February 24, 2012

Cannot connect to SQL SERVER 2005 database

Hello,
I am trying to connect to a SQL SERVER 2005 database. The database file is in App_Data folder under Inetpub/[AppRoot]
Here's the Connection String:
"Data Source=SERVER2/YUKON;AttachDbFilename=C:/Inetpub/MyNotes/App_Data/MyNotesDB.mdf;User ID=sa;Password=****"
Every time I try to connect I get a this error on my page: "Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."
Here's the stack trace:
[SqlException (0x80131904): Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +684979
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +207
System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup) +890
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +601
System.Data.SqlClient.SqlInternalConnectionTds..ctor(SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +159
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +346
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +445
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +304
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +85
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
MyNotes.Membership.MembershipManager.CreateMember(MemberProfile objMemberProfile) in c:\Inetpub\MyNotes\App_Code\MyNotes.Membership.cs:21
_Default.Page_Load(Object sender, EventArgs e) in c:\Inetpub\MyNotes\Default.aspx.cs:23
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +36
System.Web.UI.Control.OnLoad(EventArgs e) +102
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1064
Thanks in advance,
Arnie

A bit of an update...
Installed SQL Server 2000. Tried to connect to the "master" database. It gave me the "Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding." error. Same as with SQL 2005.
So at the moment:
MS SQL 2000 - doesn't work
MS SQL 2005 - doesn't work
MS SQL 2005 Express - doesn't work
=(((

No comments:

Post a Comment