I'm working on an application where I need to be able to call a .net
web service from javascript. I found the webservice.htc file, and was
able to create a page that worked just fine, except that the memory
usage of iexplore.exe began to increase without limit as the service
was called. To demonstrate this, I tried the following script, which
showed the increase very quickly by continuously calling the service.
Since useService is the only method being called, this is likely where
the problem lies. Is there a fix for this problem yet?
Thanks,
Chris
<html>
<head>
<script language="JavaS cript">
function init()
{
service.useServ ice("http://testServer/testcti/service1.asmx?W SDL","Test");
call();
}
function call()
{
service.TestCTI .callService("A gentEventWait", 1000,100,"ice1" );
}
function onWSresult()
{
call();
}
</script>
</head>
<body onload="init()" >
<div id="service" style="behavior :url(webservice .htc)"
onresult="onWSr esult()">
</div>
</body>
</html> 4 2399
IE has lots of memory leaks, not surprising that that there is a leak
calling xmlhttp. I doubt that any fix will be coming, as the soap behavior
calls for increased security settings with xp-sp2. switch to the standard
hidden frame approach for IE, and save soap calls for mozilla/netscape which
have it in.
-- bruce (sqlwork.com)
"Chris Bardon" <cm******@engma il.uwaterloo.ca > wrote in message
news:5c******** *************** *@posting.googl e.com... I'm working on an application where I need to be able to call a .net web service from javascript. I found the webservice.htc file, and was able to create a page that worked just fine, except that the memory usage of iexplore.exe began to increase without limit as the service was called. To demonstrate this, I tried the following script, which showed the increase very quickly by continuously calling the service. Since useService is the only method being called, this is likely where the problem lies. Is there a fix for this problem yet?
Thanks,
Chris
<html> <head> <script language="JavaS cript">
function init() { service.useServ ice("http://testServer/testcti/service1.asmx?W SDL","Test"); call(); }
function call() { service.TestCTI .callService("A gentEventWait", 1000,100,"ice1" ); }
function onWSresult() { call(); } </script> </head> <body onload="init()" > <div id="service" style="behavior :url(webservice .htc)" onresult="onWSr esult()"> </div> </body> </html>
Chris,
You've setup call() to call itself until run IE runs out of memory.
'onresult' is for checking the result of a callService().
In your 'onWSresult()' Javascript function don't call call(), check for the
following
function onWSresult()
{
if((event.resul t.error)&&(iCal lID==event.resu lt.id))
{
var xfaultcode = event.result.er rorDetail.code;
var xfaultstring = event.result.er rorDetail.strin g;
var xfaultsoap = event.result.er rorDetail.raw;
// Add code to output error information here
alert("Error ");
}
}
The way you have it now
function onWSresult()
{
call();
}
onWSresult() calls call() over and over again because you've setup a
onresult to fire an event after AgentEventWait is finished.
Once the first call() is finished, which is your call to your
AgentEventWait, that's when your onresult event gets fired, which is your
onWSresult() function.
onWSresult() calls call() again, once that call is finished, again your
AgentEventWait, then that's when your onresult event gets fired again, which
is your onWSresult().
To verify that this is the case, use DbgCLR.exe and set a breakpoint inside
of AgentEventWait, then call your HTML page that calls the webservice.
You'll see AgentEventWait being called again and again.
Gabe
"Chris Bardon" <cm******@engma il.uwaterloo.ca > wrote in message
news:5c******** *************** *@posting.googl e.com... I'm working on an application where I need to be able to call a .net web service from javascript. I found the webservice.htc file, and was able to create a page that worked just fine, except that the memory usage of iexplore.exe began to increase without limit as the service was called. To demonstrate this, I tried the following script, which showed the increase very quickly by continuously calling the service. Since useService is the only method being called, this is likely where the problem lies. Is there a fix for this problem yet?
Thanks,
Chris
<html> <head> <script language="JavaS cript">
function init() { service.useServ ice("http://testServer/testcti/service1.asmx?W SDL","Test"); call(); }
function call() { service.TestCTI .callService("A gentEventWait", 1000,100,"ice1" ); }
function onWSresult() { call(); } </script> </head> <body onload="init()" > <div id="service" style="behavior :url(webservice .htc)" onresult="onWSr esult()"> </div> </body> </html>
Opps, meant to say until the OS runs out of memory.
"Gabe Garza" <sp**@nospam.co m> wrote in message
news:4k******** **********@news svr21.news.prod igy.com... Chris,
You've setup call() to call itself until run IE runs out of memory. 'onresult' is for checking the result of a callService(). In your 'onWSresult()' Javascript function don't call call(), check for
the following
function onWSresult() { if((event.resul t.error)&&(iCal lID==event.resu lt.id)) { var xfaultcode = event.result.er rorDetail.code; var xfaultstring = event.result.er rorDetail.strin g; var xfaultsoap = event.result.er rorDetail.raw;
// Add code to output error information here alert("Error "); } }
The way you have it now
function onWSresult() { call(); }
onWSresult() calls call() over and over again because you've setup a onresult to fire an event after AgentEventWait is finished.
Once the first call() is finished, which is your call to your AgentEventWait, that's when your onresult event gets fired, which is your onWSresult() function. onWSresult() calls call() again, once that call is finished, again your AgentEventWait, then that's when your onresult event gets fired again,
which is your onWSresult().
To verify that this is the case, use DbgCLR.exe and set a breakpoint
inside of AgentEventWait, then call your HTML page that calls the webservice. You'll see AgentEventWait being called again and again.
Gabe
"Chris Bardon" <cm******@engma il.uwaterloo.ca > wrote in message news:5c******** *************** *@posting.googl e.com... I'm working on an application where I need to be able to call a .net web service from javascript. I found the webservice.htc file, and was able to create a page that worked just fine, except that the memory usage of iexplore.exe began to increase without limit as the service was called. To demonstrate this, I tried the following script, which showed the increase very quickly by continuously calling the service. Since useService is the only method being called, this is likely where the problem lies. Is there a fix for this problem yet?
Thanks,
Chris
<html> <head> <script language="JavaS cript">
function init() {
service.useServ ice("http://testServer/testcti/service1.asmx?W SDL","Test"); call(); }
function call() { service.TestCTI .callService("A gentEventWait", 1000,100,"ice1" ); }
function onWSresult() { call(); } </script> </head> <body onload="init()" > <div id="service" style="behavior :url(webservice .htc)" onresult="onWSr esult()"> </div> </body> </html>
Thanks Bruce-is there somewhere that details this "hidden frame"
approach that you're talking about? I tried a version where I had a
frame invoking the web service using an HTTP GET call and the page's
location property, but there was no way that I could get the returned
XML to the main frame without an access violaton. Since the web
service call that I'm making can block, I can't really use the auto
refresh property to perpetually call it. Ideally, I'd like to be able
to do what I had in my script, which is to call the service, handle
the return, then call it again. Any idea how I can accomplish this?
"bruce barker" <no***********@ safeco.com> wrote in message news:<uu******* ******@TK2MSFTN GP14.phx.gbl>.. . IE has lots of memory leaks, not surprising that that there is a leak calling xmlhttp. I doubt that any fix will be coming, as the soap behavior calls for increased security settings with xp-sp2. switch to the standard hidden frame approach for IE, and save soap calls for mozilla/netscape which have it in.
-- bruce (sqlwork.com) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Emmanuel Gehin |
last post by:
When I use the following code in VB.NET :
Public Function test() As String
Try
Dim da1 As OdbcDataAdapter
Dim i As Int32
Dim tfem As DataTable
For i = 0 To 1000
da1 = New OdbcDataAdapter("select * from TABLE1 where
TABLE1.ID= '16'", "DSN=DSNTEST;UID=UIDTEST;PWD=PWDTEST;")
|
by: Adrian |
last post by:
Hi
I have a JS program that runs localy (under IE6 only) on a PC but it has
a memory leak (probably the known MS one!)
What applications are there that I could use to look at the memory usage of
each object within my JS app to help locate my problem?
Thanks
|
by: Jim Land |
last post by:
Jack Slocum claims here
http://www.jackslocum.com/yui/2006/10/02/3-easy-steps-to-avoid-javascript-
memory-leaks/
that "almost every site you visit that uses JavaScript is leaking memory".
Anybody know anything about this?
Does *Javascript* leak memeory, or
does the *browser* leak memory?
|
by: BillE |
last post by:
I have an existing asp.net 2.0 webforms app using master/content pages, and
it works fine.
I added some Ajax elements, including some UpdatePanels and modal PopUp
panels which contain asp.net controls like gridviews with selectable rows,
buttons, textboxes. I'm using Ajax 1.0, and the users are still using IE 6.
Some heavy users reported that the application starts to run slowly after a
while, and task manager shows the memory usage...
|
by: cdmsenthil |
last post by:
I have an Infragistics UltrawebGrid . Each Row in the grid is attached to a context menu using Infragistics CSOM
Upon click on the menu, I am creating an Iframe dynamically which points to another page in the same domain which also contains infragistics datagid populated with default data retrieved from Data Base. After creating the frame I am attaching it to the HTML DOM and show it as modal popup with OK and Cancel Button inside an...
| |
by: Jay |
last post by:
I have a web app running on the windows CE device. In one of the asp.net
pages - it has javascript code. That seems to have a memory leak.
When I run the web app - in about one hour, the app hangs. I looked at the
memory and it seems to be full.
I removed all the javascript code - and the app seems to be have no leaks.
As soon as I include my javascript code - the memory consumption gradually
increases.
Whether I actually invoke the...
|
by: Daniel S |
last post by:
Hi,
I have an asp.net page with a GridEX inside an UpdatePanel. Every 20
seconds, I need to re-submit a query to the database and refresh the
GridEX with the new results; however, each time this operation occurs,
the process for IE in the task manager gains, on average, about 40 k.
If I use Firefox, there's still a leak, but it's smaller and harder to
track (memory used fluctuates more dramatically, so it's impossible to
associate a...
|
by: Daniel Orner |
last post by:
Hi all,
I've been trying to pin down a memory leak in IE6 for several WEEKS
now. I've done my share of googling etc., and know all about common
leaks like circular references and closures, but have found nothing like
this.
This app is designed to run in a kiosk environment, so it has
things like a persistent frame which holds data as well as the visible
frame (actually an iframe). After 1,000 page transitions our app is up
by almost...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |