ASP.NET Deployment - I canny do it!

  • Thread starter Thread starter Carl Howarth
  • Start date Start date
C

Carl Howarth

Hello again everyone..... I'm a real pain and keep posting re the same
thing, but it is possibly the most frustrating issue I've come across.
Please see my original post - can anybody think of a solution to this? The
main error I experience is an sqlexception saying 'General Network Error',
but as this is sporadic, and due to the fact that asp3 apps work fine I am
at a total loss as to what the issue can be.

In addition to this I connect to the database using the following:

The connections in the current activity (SQL) show as 'sleeping', which
suggests
to me that the connections have been closed.

I am using a component to access the database, based on the following:
Public ReadOnly Property ConnectionString()

Get

ConnectionString = "Data Source=10.200.20.2; Initial Catalog=ClientCAS;User
ID=sa;Password=password; Network Library=dbmssocn;"

End Get

End Property


Public Function GetReader(ByVal strSQL As String) As SqlDataReader

Dim tmpConn As New SqlConnection(Me.ConnectionString)

Dim objCmd As New SqlCommand(strSQL, tmpConn)

objCmd.Connection.Open()

objCmd.CommandTimeout = 300

GetReader = objCmd.ExecuteReader(CommandBehavior.CloseConnection)

objCmd = Nothing

End Function


And then within my pages' back end code I would do something along these
lines to fill, say, a datagrid:

dim obj as new cpData
dim dr as sqldatareader = obj.GetReader("spStoredProc " & id)
dg.datasource = dr
dg.databind
dr.close
dr = nothing
obj = nothing

---------------------->
Hi Gregory,

Thanks for coming back to me. I am at a loss with this but will run some
checks as you have suggested. The network issue really is confusing,
certainly since the 'classic' asp applications that we are running do not
experience this problem at all.

Whilst testing, I have noticed that if I log into the system and jump
between pages at frequent intervals it seems to work perfectly. It seems
that if I leave a page displayed for any length of time then choose another
lin k that is when the system freezes up - I don't know if that gives you
any further clues. I have altered the web.config file to say debug="false",
which has made no difference and have checked the code and I certainly
believe that all objects used are being destroyed after use.

Another clue that may help is that part of the system is 'upgraded' classic
asp, ie we have simply converted the existing asp pages and got rid of the
'set' commands, used isdbnull instead of isnull, and have set aspcompat
accordingly (only on converted pages), I cannot see this as being an issue
due to the fact that these all work wonderfully on my machine.

If you have any other ideas (or not!) in relation to this please let me
know.

Many thanks again, Carl
 
Hi

Try to change your SQL Statement by adding/removing ORDER
BY, WHERE..... if it solves the problem, it means that
your sql statement does not return data in the normal
manner.... i.e. slower than ADO.NET expect.

2. If you are using simultanious connections, you might
have some problem about connection pooling, try to add
Pooling=false in Sql connection string. If this is the
problem, make sure that you use the exact same Sql
statement everywhere......

3. But if you are using Trusted Connection and set
pooling to true right now, but you also set
impersonation=true. The problem is that it will login
using different accounts causing the connection pool to
be useless. You might either use SQL account or set
Pooling = false in the connection string to solve the
problem.


Check out the following URL
also:http://forums.devshed.com/archive/52/2003/01/4/49612

Ravikanth[MVP]

-----Original Message-----
Hello again everyone..... I'm a real pain and keep posting re the same
thing, but it is possibly the most frustrating issue I've come across.
Please see my original post - can anybody think of a solution to this? The
main error I experience is an sqlexception
saying 'General Network Error',
 
Carl, my idea is that this may be an ADO.NET issue and not an ASP.NET issue.
Perhaps you should post to
microsoft.public.dotnet.framework.adonet?
 
Ravikanth,

Point 2 has made the system work - which is good.... However what will
happen when I start to get numerous users of the system?

Many thanks, Carl
 
Back
Top