Sstem.Data.EntityException

venerdì 18 maggio 2012 - 11.31

squilibrium Profilo | Junior Member

Ciao a tutti

Ho un' applicazione windows form che comunica con il database tramite entity framework. Attualmente è stata testata su una decina di computer (installazione tramite clickonce), solo su uno di questi ogni tanto ricevo un errore di connessione.

L'unica differenza è che è un portatile (non vedo come possa influire però....)

Vi riporto l'errore:

************** Testo dell'eccezione **************
System.Data.EntityException: Errore del provider sottostante in Open. --->
System.Data.SqlClient.SqlException: Si è verificato un errore di rete o specifico
dell'istanza mentre si cercava di stabilire una connessione con SQL Server. Il
server non è stato trovato o non è accessibile. Verificare che il nome dell'istanza
sia corretto e che SQL Server sia configurato in modo da consentire connessioni
remote. (provider: Named Pipes Provider, error: 40 - Impossibile aprire una
connessione a SQL Server)
in System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception,
Boolean breakConnection)
in System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
in System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo,
SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64
timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean
integratedSecurity)
in System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo
serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, TimeoutTimer
timeout, SqlConnection owningObject)
in System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo
serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection
owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout)
in System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
owningObject, TimeoutTimer timeout, SqlConnectionString connectionOptions, String
newPassword, Boolean redirectedUserInstance)
in System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity
identity, SqlConnectionString connectionOptions, Object providerInfo, String
newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
in
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningConnection)
in
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection
owningConnection, DbConnectionPool pool, DbConnectionOptions options)
in System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
in System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
owningObject)
in System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
owningObject)
in System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
owningConnection)
in System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory)
in System.Data.SqlClient.SqlConnection.Open()
in System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean
openCondition, DbConnection storeConnectionToOpen, DbConnection
originalConnection, String exceptionCode, String attemptedOperation, Boolean&
closeStoreConnectionOnFailure)
--- Fine della traccia dello stack dell'eccezione interna ---
in System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean
openCondition, DbConnection storeConnectionToOpen, DbConnection
originalConnection, String exceptionCode, String attemptedOperation, Boolean&
closeStoreConnectionOnFailure)
in System.Data.EntityClient.EntityConnection.Open()
in System.Data.Objects.ObjectContext.EnsureConnection()
in System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
in
System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()
in System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
in
System.Data.Objects.ELinq.ObjectQueryProvider.<GetElementFunction>b__0[TResult](IEnumerable`1
sequence)
in
System.Data.Objects.ELinq.ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable`1
query, Expression queryRoot)
in
System.Data.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute[S](Expression
expression)
in System.Linq.Queryable.First[TSource](IQueryable`1 source)
in NSFramweowrk.AWPBusinessLogic.BllPda.GetPdaById(Int32 pda_id)
in AWPPortal.Logistica.frmInstallaSpostaApparato.frmInstallaSpostaPDA_Load(Object
sender, EventArgs e)
in System.EventHandler.Invoke(Object sender, EventArgs e)
in System.Windows.Forms.Form.OnLoad(EventArgs e)
in DevExpress.XtraEditors.XtraForm.OnLoad(EventArgs e)
in System.Windows.Forms.Form.OnCreateControl()
in System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
in System.Windows.Forms.Control.CreateControl()
in System.Windows.Forms.Control.WmShowWindow(Message& m)
in System.Windows.Forms.Control.WndProc(Message& m)
in System.Windows.Forms.ScrollableControl.WndProc(Message& m)
in System.Windows.Forms.Form.WmShowWindow(Message& m)
in System.Windows.Forms.Form.WndProc(Message& m)
in DevExpress.XtraEditors.XtraForm.WndProc(Message& msg)
in System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
in System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
in System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr
wparam, IntPtr lparam)


************** Assembly caricati **************
mscorlib
Versione assembly: 4.0.0.0
Versione Win32: 4.0.30319.544 (RTMLDR.030319-5400)
Base di codice: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
System
Versione assembly: 4.0.0.0
Versione Win32: 4.0.30319.544 built by: RTMLDR
Base di codice:
file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
AWPPortal
Versione assembly: 1.0.0.0
Versione Win32: 1.0.0.0
Base di codice:
file:///C:/Users/graffaele/AppData/Local/Apps/2.0/ZNN861KL.BVN/Q1G9YV4M.Q4P/awpp..tion_96fd68f1c15e4826_0001.0000_2398e68a7835b282/AWPPortal.exe
----------------------------------------
AWPRepository
Versione assembly: 1.0.0.0
Versione Win32: 1.0.0.0
Base di codice:
file:///C:/Users/graffaele/AppData/Local/Apps/2.0/ZNN861KL.BVN/Q1G9YV4M.Q4P/awpp..tion_96fd68f1c15e4826_0001.0000_2398e68a7835b282/AWPRepository.DLL
----------------------------------------
System.Data.Entity
Versione assembly: 4.0.0.0
Versione Win32: 4.0.30319.1 built by: RTMRel
Base di codice:
file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Data.Entity/v4.0_4.0.0.0__b77a5c561934e089/System.Data.Entity.dll
----------------------------------------
System.Core
Versione assembly: 4.0.0.0
Versione Win32: 4.0.30319.450 built by: RTMLDR
Base di codice:
file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
DevExpress.Utils.v11.2
Versione assembly: 11.2.10.0
Versione Win32: 11.2.10.0
Base di codice:
file:///C:/Users/graffaele/AppData/Local/Apps/2.0/ZNN861KL.BVN/Q1G9YV4M.Q4P/awpp..tion_96fd68f1c15e4826_0001.0000_2398e68a7835b282/DevExpress.Utils.v11.2.DLL
----------------------------------------
System.Windows.Forms
Versione assembly: 4.0.0.0
Versione Win32: 4.0.30319.544 built by: RTMLDR
Base di codice:
file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Versione assembly: 4.0.0.0
Versione Win32: 4.0.30319.551 built by: RTMLDR
Base di codice:
file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
DevExpress.XtraBars.v11.2
Versione assembly: 11.2.10.0
Versione Win32: 11.2.10.0
Base di codice:
file:///C:/Users/graffaele/AppData/Local/Apps/2.0/ZNN861KL.BVN/Q1G9YV4M.Q4P/awpp..tion_96fd68f1c15e4826_0001.0000_2398e68a7835b282/DevExpress.XtraBars.v11.2.DLL
----------------------------------------
DevExpress.XtraEditors.v11.2
Versione assembly: 11.2.10.0
Versione Win32: 11.2.10.0
Base di codice:
file:///C:/Users/graffaele/AppData/Local/Apps/2.0/ZNN861KL.BVN/Q1G9YV4M.Q4P/awpp..tion_96fd68f1c15e4826_0001.0000_2398e68a7835b282/DevExpress.XtraEditors.v11.2.DLL
----------------------------------------
DevExpress.Data.v11.2
Versione assembly: 11.2.10.0
Versione Win32: 11.2.10.0
Base di codice:
file:///C:/Users/graffaele/AppData/Local/Apps/2.0/ZNN861KL.BVN/Q1G9YV4M.Q4P/awpp..tion_96fd68f1c15e4826_0001.0000_2398e68a7835b282/DevExpress.Data.v11.2.DLL
----------------------------------------
AWPBusinessLogic
Versione assembly: 1.0.0.0
Versione Win32: 1.0.0.0
Base di codice:
file:///C:/Users/graffaele/AppData/Local/Apps/2.0/ZNN861KL.BVN/Q1G9YV4M.Q4P/awpp..tion_96fd68f1c15e4826_0001.0000_2398e68a7835b282/AWPBusinessLogic.DLL
----------------------------------------
System.Data
Versione assembly: 4.0.0.0
Versione Win32: 4.0.30319.468 (RTMLDR.030319-4600)
Base di codice:
file:///C:/windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Configuration
Versione assembly: 4.0.0.0
Versione Win32: 4.0.30319.1 (RTMRel.030319-0100)
Base di codice:
file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Versione assembly: 4.0.0.0
Versione Win32: 4.0.30319.450 built by: RTMLDR
Base di codice:
file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Numerics
Versione assembly: 4.0.0.0
Versione Win32: 4.0.30319.1 built by: RTMRel
Base di codice:
file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
----------------------------------------
System.Data.OracleClient
Versione assembly: 4.0.0.0
Versione Win32: 4.0.30319.1 (RTMRel.030319-0100)
Base di codice:
file:///C:/windows/Microsoft.Net/assembly/GAC_32/System.Data.OracleClient/v4.0_4.0.0.0__b77a5c561934e089/System.Data.OracleClient.dll
----------------------------------------
System.Web
Versione assembly: 4.0.0.0
Versione Win32: 4.0.30319.547 built by: RTMLDR
Base di codice:
file:///C:/windows/Microsoft.Net/assembly/GAC_32/System.Web/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Web.dll
----------------------------------------
DevExpress.XtraLayout.v11.2
Versione assembly: 11.2.10.0
Versione Win32: 11.2.10.0
Base di codice:
file:///C:/Users/graffaele/AppData/Local/Apps/2.0/ZNN861KL.BVN/Q1G9YV4M.Q4P/awpp..tion_96fd68f1c15e4826_0001.0000_2398e68a7835b282/DevExpress.XtraLayout.v11.2.DLL
----------------------------------------
DevExpress.XtraGrid.v11.2
Versione assembly: 11.2.10.0
Versione Win32: 11.2.10.0
Base di codice:
file:///C:/Users/graffaele/AppData/Local/Apps/2.0/ZNN861KL.BVN/Q1G9YV4M.Q4P/awpp..tion_96fd68f1c15e4826_0001.0000_2398e68a7835b282/DevExpress.XtraGrid.v11.2.DLL
----------------------------------------
DevExpress.XtraWizard.v11.2
Versione assembly: 11.2.10.0
Versione Win32: 11.2.10.0
Base di codice:
file:///C:/Users/graffaele/AppData/Local/Apps/2.0/ZNN861KL.BVN/Q1G9YV4M.Q4P/awpp..tion_96fd68f1c15e4826_0001.0000_2398e68a7835b282/DevExpress.XtraWizard.v11.2.DLL
----------------------------------------
DevExpress.XtraNavBar.v11.2
Versione assembly: 11.2.10.0
Versione Win32: 11.2.10.0
Base di codice:
file:///C:/Users/graffaele/AppData/Local/Apps/2.0/ZNN861KL.BVN/Q1G9YV4M.Q4P/awpp..tion_96fd68f1c15e4826_0001.0000_2398e68a7835b282/DevExpress.XtraNavBar.v11.2.DLL
----------------------------------------
gw.supports
Versione assembly: 1.0.0.0
Versione Win32: 1.0.0.0
Base di codice:
file:///C:/Users/graffaele/AppData/Local/Apps/2.0/ZNN861KL.BVN/Q1G9YV4M.Q4P/awpp..tion_96fd68f1c15e4826_0001.0000_2398e68a7835b282/gw.supports.DLL
----------------------------------------
System.Xml.Linq
Versione assembly: 4.0.0.0
Versione Win32: 4.0.30319.1 built by: RTMRel
Base di codice:
file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll
----------------------------------------
System.xml.resources
Versione assembly: 4.0.0.0
Versione Win32: 4.0.30319.1 built by: RTMRel
Base di codice:
file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml.resources/v4.0_4.0.0.0_it_b77a5c561934e089/System.Xml.resources.dll
----------------------------------------
System.Web.Services
Versione assembly: 4.0.0.0
Versione Win32: 4.0.30319.1 (RTMRel.030319-0100)
Base di codice:
file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Web.Services/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Web.Services.dll
----------------------------------------
System.Runtime.Serialization
Versione assembly: 4.0.0.0
Versione Win32: 4.0.30319.1 (RTMRel.030319-0100)
Base di codice:
file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll
----------------------------------------
System.Transactions
Versione assembly: 4.0.0.0
Versione Win32: 4.0.30319.1 (RTMRel.030319-0100)
Base di codice:
file:///C:/windows/Microsoft.Net/assembly/GAC_32/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
Versione assembly: 4.0.0.0
Versione Win32: 4.0.30319.1 (RTMRel.030319-0100)
Base di codice:
file:///C:/windows/Microsoft.Net/assembly/GAC_32/System.EnterpriseServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
Anonymously Hosted DynamicMethods Assembly
Versione assembly: 0.0.0.0
Versione Win32: 4.0.30319.544 (RTMLDR.030319-5400)
Base di codice:
file:///C:/windows/Microsoft.Net/assembly/GAC_32/mscorlib/v4.0_4.0.0.0__b77a5c561934e089/mscorlib.dll
----------------------------------------
System.Data.Entity.resources
Versione assembly: 4.0.0.0
Versione Win32: 4.0.30319.1 built by: RTMRel
Base di codice:
file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Data.Entity.resources/v4.0_4.0.0.0_it_b77a5c561934e089/System.Data.Entity.resources.dll
----------------------------------------
mscorlib.resources
Versione assembly: 4.0.0.0
Versione Win32: 4.0.30319.454 (RTMLDR.030319-4500)
Base di codice:
file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_it_b77a5c561934e089/mscorlib.resources.dll
----------------------------------------
WindowsBase
Versione assembly: 4.0.0.0
Versione Win32: 4.0.30319.550 built by: RTMLDR
Base di codice:
file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/WindowsBase/v4.0_4.0.0.0__31bf3856ad364e35/WindowsBase.dll
----------------------------------------
Accessibility
Versione assembly: 4.0.0.0
Versione Win32: 4.0.30319.1 built by: RTMRel
Base di codice:
file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
chxrxyyu
Versione assembly: 1.0.0.0
Versione Win32: 4.0.30319.544 built by: RTMLDR
Base di codice:
file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Data.resources
Versione assembly: 4.0.0.0
Versione Win32: 4.0.30319.1 (RTMRel.030319-0100)
Base di codice:
file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Data.resources/v4.0_4.0.0.0_it_b77a5c561934e089/System.Data.resources.dll
----------------------------------------
System.Windows.Forms.resources
Versione assembly: 4.0.0.0
Versione Win32: 4.0.30319.1 built by: RTMRel
Base di codice:
file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_it_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------

************** Debug JIT **************
Per abilitare il debug JIT, è necessario impostare il valore
jitDebugging nella sezione system.windows.forms del file di configurazione
dell'applicazione o del computer (machine.config).
L'applicazione inoltre deve essere compilata con il debug
abilitato.

Ad esempio:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

Quando il debug JIT è abilitato, tutte le eccezioni non gestite
vengono inviate al debugger JIT registrato nel computer,
anziché essere gestite da questa finestra di dialogo.


grazie
Partecipa anche tu! Registrati!
Hai bisogno di aiuto ?
Perchè non ti registri subito?

Dopo esserti registrato potrai chiedere
aiuto sul nostro Forum oppure aiutare gli altri

Consulta le Stanze disponibili.

Registrati ora !
Copyright © dotNetHell.it 2002-2017
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5