Request timed out nell'invocare un web service

venerdì 04 luglio 2008 - 12.53

paquito_ita Profilo | Senior Member

Ciao,

ho realizzato un WS che funziona correttamente sul Server. Ho apportato alcune modifiche e ora quando viene invocato un web method tutto il server si pianta, perché non viene fornita la risposta al Client.

Ho provato a fare diversi test in locale (con DB Access in locale) e tutto funziona correttamente. Non ci sono loop e le connessioni al DB vengono chiuse dopo il loro utilizzo:
private OdbcDataReader GetSQLReader(string SQLString) { //LOCAL DB OdbcConnection myConnection = new OdbcConnection(localConnectionString); //REMOTE DB // OdbcConnection myConnection = new OdbcConnection(remoteConnectionString); OdbcCommand myCommand = new OdbcCommand(SQLString, myConnection); myConnection.Open(); // Execute the DataReader and access the data. OdbcDataReader result = myCommand.ExecuteReader(CommandBehavior.CloseConnection); return result; } private DataSet GetSQLReaderDataSet(string SQLString) { //LOCAL DB -- for DEBUG OdbcConnection myConnection = new OdbcConnection(localConnectionString); //REMOTE DB // OdbcConnection myConnection = new OdbcConnection(remoteConnectionString); OdbcCommand myCommand = new OdbcCommand(SQLString, myConnection); myConnection.Open(); OdbcDataAdapter adapter = new OdbcDataAdapter(); adapter.SelectCommand = myCommand; DataSet data = new DataSet(); adapter.Fill(data); return data; } //To execute a query without the result (e.g. INSERT) private int RunSQLString(string SQLString) { //LOCAL DB -- for DEBUG OdbcConnection myConnection = new OdbcConnection(localConnectionString); //REMOTE DB // OdbcConnection myConnection = new OdbcConnection(remoteConnectionString); OdbcCommand myCommand = new OdbcCommand(SQLString, myConnection); myCommand.CommandType = CommandType.Text; myConnection.Open(); int rowsAffected = myCommand.ExecuteNonQuery(); myConnection.Close(); return rowsAffected; }

Da cosa potrebbe dipendere? Mi sapreste suggerire qualche test per capire il motivo per cui il LOCALE funziona ma in REMOTO no?
Grazie

rossimarko Profilo | Guru

Ciao,

cosa vuol dire che tutto il server si pianta? Non arrivano più risposte? La cpu va al 100%?

-----------------------------------------
Rossi Marco
http://blogs.dotnethell.it/rossimarko

paquito_ita Profilo | Senior Member

Il Server si piantava fino a che non veniva lanciata la timeout exception al Client.
Ho poi risolto trovando che un paio di connessioni al DB Access non venivano chiuse...ma che patema!!

Grazie comunque
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-2023
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5