Core

Hello, I appeal to all to save me from this situation.

I have a WebService in VB.net by IIS and a operation to connect to the SQL server and run a query and others operations. All fine...

But after a certain time only the SQL operations don't respond nothing, the others are OK. So the problem is not in the IIS i think and something between the IIS and the SQL Server.

Can you give me some light about this PLEASEEEE Big Smile
Thanks

If any of you need the source say it.
Thanks



Re: ASMX Web Services and XML Serialization SQL connections stop & Webservices

Andrew Wang - MSFT

Hi,

Could you clarify what you meant by "don't respond nothing" I have two guesses about what it might mean:

1. You made a synchronous call to query in SQL and it returned an empty set.

2. You made an asynchronous call to query in SQL, and the SQL server didn't call back.

Some clarifications would be helpful. Also, provide a simplified version of your code that caused the problem.

Have you tried to ask this question in the SQL forum People in this forum are not necessarily familiar with SQL so they might not be able to help you out. Try to find some help in the SQL forum. Here is the link.

Thanks,

-Andrew




Re: ASMX Web Services and XML Serialization SQL connections stop & Webservices

Core

Option 2 I think.


Per example, I have a operation that return a simple string, like this, I do a "ping" and the webservice return a "pong"...

Simple operation.. The problem remains, in the operations who return data who derived from a SQL Server.

After same time, I don't know how many requests , that operations just don't return nothing... Then i have to make a IISRESET to this operation and all return to normal.

Like, The same operation who same time ago work just fine, just stop working. The only that stop are the one's realetad to the request by SQL Query.

This is happening on my machine with SQLExpress.



Witch operation call this function to fill up a DataSet, who will later use to echo the data in XML style.



Code Block


Public Function sqlConnect(ByVal strServerVirgem As String, ByVal strDataBase As String, By ...

connectionString = "server = " & strServer & ";Initial Catalog = " & strDataBase & ";" & _
"User ID = " & strDBUsername & ";Password = " & strDBPassword & ";"
'Conexao SQL
MySQLConnection = New SqlClient.SqlConnection(connectionString)
Try
MySQLConnection.Open()
Catch ex As Exception
Return "Erro ao Conectar com o Servidor."
End Try

MySQLCommand = New SqlClient.SqlCommand(strSQLQuery, MySQLConnection)
MySQLDataAdapter = New SqlClient.SqlDataAdapter(MySQLCommand)

Dim MyDataSet As DataSet
MyDataSet = New DataSet
MySQLDataAdapter.Fill(MyDataSet)

Return MyDataSet

MySQLConnection.Dispose()