Allen Wood
asked on
Entity Framework
I have an existing website, I wanted to start using EF, it works fine locally but not on the test server. I get the following.
[Win32Exception (0x80004005): The network path was not found]
[SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)]
System.Data.SqlClient.SqlI nternalCon nection.On Error(SqlE xception exception, Boolean breakConnection, Action`1 wrapCloseInAction) +6568718
System.Data.SqlClient.TdsP arser.Thro wException AndWarning (TdsParser StateObjec t stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +717
System.Data.SqlClient.TdsP arser.Conn ect(Server Info serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover) +6595160
System.Data.SqlClient.SqlI nternalCon nectionTds .AttemptOn eLogin(Ser verInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover) +219
System.Data.SqlClient.SqlI nternalCon nectionTds .LoginNoFa ilover(Ser verInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout) +6597471
System.Data.SqlClient.SqlI nternalCon nectionTds .OpenLogin Enlist(Tim eoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance) +6598051
System.Data.SqlClient.SqlI nternalCon nectionTds ..ctor(DbC onnectionP oolIdentit y identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData) +942
System.Data.SqlClient.SqlC onnectionF actory.Cre ateConnect ion(DbConn ectionOpti ons options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) +1162
System.Data.ProviderBase.D bConnectio nFactory.C reatePoole dConnectio n(DbConnec tionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) +72
System.Data.ProviderBase.D bConnectio nPool.Crea teObject(D bConnectio n owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) +6601305
System.Data.ProviderBase.D bConnectio nPool.User CreateRequ est(DbConn ection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) +103
System.Data.ProviderBase.D bConnectio nPool.TryG etConnecti on(DbConne ction owningObject, UInt32 waitForMultipleObjectsTime out, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) +2102
System.Data.ProviderBase.D bConnectio nPool.TryG etConnecti on(DbConne ction owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +116
System.Data.ProviderBase.D bConnectio nFactory.T ryGetConne ction(DbCo nnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) +1079
System.Data.ProviderBase.D bConnectio nInternal. TryOpenCon nectionInt ernal(DbCo nnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +6605799
System.Data.SqlClient.SqlC onnection. TryOpenInn er(TaskCom pletionSou rce`1 retry) +233
System.Data.SqlClient.SqlC onnection. TryOpen(Ta skCompleti onSource`1 retry) +278
System.Data.SqlClient.SqlC onnection. Open() +239
System.Data.Entity.Infrast ructure.In terception .InternalD ispatcher` 1.Dispatch (TTarget target, Action`2 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed) +207
System.Data.Entity.Infrast ructure.In terception .DbConnect ionDispatc her.Open(D bConnectio n connection, DbInterceptionContext interceptionContext) +438
System.Data.Entity.SqlServ er.<>c__Di splayClass 1.<Execute >b__0() +15
System.Data.Entity.SqlServ er.Default SqlExecuti onStrategy .Execute(F unc`1 operation) +263
System.Data.Entity.Core.En tityClient .EntityCon nection.Op en() +437
[EntityException: The underlying provider failed on Open.]
System.Data.Entity.Core.En tityClient .EntityCon nection.Op en() +701
System.Data.Entity.Core.Ob jects.Obje ctContext. EnsureConn ection(Boo lean shouldMonitorTransactions) +170
System.Data.Entity.Core.Ob jects.Obje ctContext. ExecuteInT ransaction (Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess ) +70
System.Data.Entity.Core.Ob jects.<>c_ _DisplayCl ass3.<GetR esults>b__ 1() +239
System.Data.Entity.SqlServ er.Default SqlExecuti onStrategy .Execute(F unc`1 operation) +263
System.Data.Entity.Core.Ob jects.Obje ctQuery`1. GetResults (Nullable` 1 forMergeOption) +368
System.Data.Entity.Core.Ob jects.Obje ctQuery`1. <System.Co llections. Generic.IE numerable< T>.GetEnum erator>b__ 0() +11
System.Data.Entity.Interna l.LazyEnum erator`1.M oveNext() +50
Account_MultiModelAdmin.Sa veOldValue s() in c:\inetpub\wwwroot\PHLive_ Net_2_2012 _testing\A ccount\Mul tiModelAdm in.aspx.cs :92
Account_MultiModelAdmin.Pa ge_Load(Ob ject sender, EventArgs e) in c:\inetpub\wwwroot\PHLive_ Net_2_2012 _testing\A ccount\Mul tiModelAdm in.aspx.cs :36
System.Web.UI.Control.Load Recursive( ) +71
System.Web.UI.Page.Process RequestMai n(Boolean includeStagesBeforeAsyncPo int, Boolean includeStagesAfterAsyncPoi nt) +3178
[Win32Exception (0x80004005): The network path was not found]
[SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)]
System.Data.SqlClient.SqlI
System.Data.SqlClient.TdsP
System.Data.SqlClient.TdsP
System.Data.SqlClient.SqlI
System.Data.SqlClient.SqlI
System.Data.SqlClient.SqlI
System.Data.SqlClient.SqlI
System.Data.SqlClient.SqlC
System.Data.ProviderBase.D
System.Data.ProviderBase.D
System.Data.ProviderBase.D
System.Data.ProviderBase.D
System.Data.ProviderBase.D
System.Data.ProviderBase.D
System.Data.ProviderBase.D
System.Data.SqlClient.SqlC
System.Data.SqlClient.SqlC
System.Data.SqlClient.SqlC
System.Data.Entity.Infrast
System.Data.Entity.Infrast
System.Data.Entity.SqlServ
System.Data.Entity.SqlServ
System.Data.Entity.Core.En
[EntityException: The underlying provider failed on Open.]
System.Data.Entity.Core.En
System.Data.Entity.Core.Ob
System.Data.Entity.Core.Ob
System.Data.Entity.Core.Ob
System.Data.Entity.SqlServ
System.Data.Entity.Core.Ob
System.Data.Entity.Core.Ob
System.Data.Entity.Interna
Account_MultiModelAdmin.Sa
Account_MultiModelAdmin.Pa
System.Web.UI.Control.Load
System.Web.UI.Page.Process
have you changed your connection string? probably in your web.config.
ASKER
Yes, changewd the connectionstring in the web.config.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.