Last post Nov 23, 2010 06:59 PM by fizzystutter
Nov 19, 2010 01:35 PM|fizzystutter|LINK
This issue has been plaguing me for some time now and I'm hitting a brick wall with it. Everything works fine on my local machine but when I upload to the live webserver I get problems. I've recently noticed 2 of my websites with the same host (Crystaltech)
have this exact same problem.
I have a textbox on the page that the user can write in, when a button is clicked a command is sent to the code behind into a stored procedure (SQL Server) and updates the corresponding text in the database. Sounds simple right ?
Every so often, and it doesn't depend on the text that I'm putting in there, the page seems to hang and then sends me the following error (google chrome):
When I perform the same command in IE the page just says "Internet Explorer cannot display the webpage"
and Firefox sends me the following error: "ReadResponse() failed: The server did not return a response for this request. "
I've put the following in my code behind in order to send the viewstate to a session but with no luck:
Protected Overrides ReadOnly Property PageStatePersister() As PageStatePersister
Return New SessionPageStatePersister(Me)
I've also increased the execute time and request length to the following in the web.config file but still with no luck:
<httpRuntime executionTimeout="600" maxRequestLength="51200" />
The command that sends the data to the database is:
Dim connectionString As String = ConfigurationManager.ConnectionStrings("GeneralConnectionString").ConnectionString
Dim dbConnection As System.Data.IDbConnection = New System.Data.SqlClient.SqlConnection(connectionString)
Dim queryString As String = "WEBSITEADMIN_HTML_UpdateSingle"
Dim rsCommand As System.Data.IDbCommand = New System.Data.SqlClient.SqlCommand
rsCommand.Parameters.Add(New SqlParameter("@HTMLID", SqlDbType.VarChar))
rsCommand.Parameters("@HTMLID").Value = Request.QueryString("HTMLID")
rsCommand.Parameters.Add(New SqlParameter("@HTMLContent", SqlDbType.NText))
rsCommand.Parameters("@HTMLContent").Value = BodyText
rsCommand.Parameters.Add(New SqlParameter("@LoginID", SqlDbType.VarChar))
rsCommand.Parameters("@LoginID").Value = AdministrationUtilities.GetLoginID()
rsCommand.CommandText = queryString
rsCommand.Connection = dbConnection
rsCommand.CommandType = CommandType.StoredProcedure
Dim dataReader As System.Data.IDataReader = rsCommand.ExecuteReader(System.Data.CommandBehavior.CloseConnection)
Any help would be appreciated as I'm well and truly stuck
Nov 23, 2010 06:59 PM|fizzystutter|LINK
It turns out that my code was hitting there SRX firewall. Now that they've white-listed my site the form works.