472,782 Members | 1,144 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,782 software developers and data experts.

HTTPRequest Freezes For 5 Minutes Intermittently And Throws "Unknown name" Javascript Exception

I am using the Microsoft.XMLHTTP object to make server requests ie;
ajax. This is working 99% of the time but occasionally it will freeze
at the server for 5 minutes and then raise a javascript exception
"Unknown name".

After the exception I can run the same request ok, and keep doing so
until the next time it freezes for 5 minutes.

What does the "Unknown name" javascript exception mean?

Why does it freeze for 5 minutes?

I can't replicate this on my dev pc, it's only happening in a live
environment with IE6 and 2 load balanced IIS6 servers.

Dec 4 '06 #1
2 4749

oo******@yahoo.co.uk wrote:
I am using the Microsoft.XMLHTTP object to make server requests ie;
ajax. This is working 99% of the time but occasionally it will freeze
at the server for 5 minutes and then raise a javascript exception
"Unknown name".

After the exception I can run the same request ok, and keep doing so
until the next time it freezes for 5 minutes.

What does the "Unknown name" javascript exception mean?

Why does it freeze for 5 minutes?

I can't replicate this on my dev pc, it's only happening in a live
environment with IE6 and 2 load balanced IIS6 servers.
Are you using "synchronous" or "asynchronous" XMLHttp? Turn on the
Asynchronous option and your script won't hang. Otherwise, this is not
a JavaScript issue but an HTTP issue and the problem lies between your
server and your connection. I take it you have some sort of session
timeout and the connection keeps getting reset. Without seeing any of
your code to know what's going on here, I'd take a stab at it and say
"Unknown name" is probably an HTTP error that you're running into when
the request times out.

Dec 4 '06 #2
Are you using "synchronous" or "asynchronous" XMLHttp? Turn on the
Asynchronous option and your script won't hang. Otherwise, this is not
a JavaScript issue but an HTTP issue and the problem lies between your
server and your connection. I take it you have some sort of session
timeout and the connection keeps getting reset. Without seeing any of
your code to know what's going on here, I'd take a stab at it and say
"Unknown name" is probably an HTTP error that you're running into when
the request times out.
I'm using a synchronous http request, I've attached my function below.
I can't use asynchronous because the flow needs to be strictly
controlled due to the nature of the application. The catch() block is
triggered after the 5 minute freeze. The http request completes
successfully after 5 minutes.

This problem hasn't occured since iisreset was run last night. If this
problem comes back I will update this thread.

Thanks

CallServer : function( sAction, sSendMethod)
{
var sReturn = "";
var oEngine;// = this.Request.Engine;
var sParameterString = "";
var sPostString = null;

try
{
oEngine = new ActiveXObject("Microsoft.XMLHTTP");//ELMS TEST
if( oEngine != null)
{
if( oEngine.readyState == 4 || oEngine.readyState == 0)
{
var sUrl = "ServerInteract.aspx?token=" + Page.Token + "&dothis=" +
sAction;

if( arguments != null)
{
for( nParameterIndex = 2; nParameterIndex < arguments.length;
nParameterIndex ++)
{
sParameterString += arguments[nParameterIndex];
if( nParameterIndex < arguments.length - 1)
{
sParameterString += "&";
}
}
}

if( sSendMethod.toLowerCase() == "post")
{
sPostString = sParameterString;
}
else
{
sUrl += "&" + sParameterString;
}

sUrl += "&millis=" + new Date().getTime();

oEngine.open( sSendMethod, sUrl, false);
oEngine.setRequestHeader( 'Content-Type',
'application/x-www-form-urlencoded');

System.Log( "ServerInteract.CallServer() : Sending '" + sPostString
+ "' with action '" + sAction + "' to " + sUrl);

oEngine.send( sPostString);

sReturn = oEngine.ResponseText;

System.Log( "ServerInteract.CallServer() : Done : \r\n" + sReturn);

if( sReturn.indexOf( "exception:") == 0)
{
PageRendering.HandleError( sReturn);
sReturn = "";
}
}
else
{
System.Log( "ServerInteract.CallServer() : Cannot Send() because
oEngine.readyState = " = oEngine.readyState);
}
}
else
{
System.Log( "ServerInteract.CallServer() : Cannot Send() because
oEngine is null");
sReturn = "";
PageRendering.HandleError( "XmlHttpRequest Fail 1");
}
}
catch( e)
{
sReturn = "";
System.Log( "ServerInteract.CallServer() : Cannot Send() because of
exception '" + e.message + "");
PageRendering.HandleError( "XmlHttpRequest Fail 2: " + e.message);
}

return sReturn;
},

Dec 5 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: jon morgan | last post by:
Hi, Just how do you track down the location of an exception when all you get is a message saying "NullReferenceException occured in Unknown Module" ? It seems like the proverbial needle in a...
8
by: Calan | last post by:
I have a server-side ASP script that dynamically creates an input form from a database table. The table contains a field name, the table where values are stored, type of input control, value for a...
0
by: David Mediavilla | last post by:
I am trying to check a SOAP signature with WSE 1.0 SP1, but with a certain transform I only get an "Unknown tranform" exception. The SOAP signature is like this: <ds:Signature>...
0
by: hantheman | last post by:
Hi, I have a few __hook calls to handle COM events in an event_receiver. However, the call to __hook throws an unknown exception. I can query the connection point just fine, but the hooking...
0
by: Shaun | last post by:
Hi all, I'm trying to implement a custom session handler that writes session data to a MySQL database. It works fine about 99% of the time. Trouble is, at random intervals, I get entries like...
9
by: Klaus Johannes Rusch | last post by:
IE7 returns "unknown" instead of "undefined" when querying the type of an unknown property of an object, for example document.write(typeof window.missingproperty); Has "unknown" been defined...
7
by: John | last post by:
Hi Everyone, I'm having this extremely annoying problem with Internet Explorer 6, giving me an error message saying "unknown runtime error" whenever I try to alter the contents of a <divelement...
0
by: Peter Nofelt | last post by:
Hi all, ISSUE: ==================== In SQL 2005 (sp2) I get the following error when preforming a bulk insert with an associated xml format file: "Could not bulk insert. Unknown version of...
9
by: Adem | last post by:
Is it possible to get some info about an unknown exception, ie. the "catch (...)" case below: catch (const blah1 &ex) { cout << "blah1 exception." << endl; } catch (const blah2 &ex) {
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.