Ajax Request Times Out (or Is Really Slow)
Nov 15, 2010
My basic structure is that I have a table on a page, which I want to reload without refreshing the entire page. So on clicking a button on the page it fires of this:
function RefreshMissionsAjax() {
//fade out the old table.
$(clientID('MissionsDisplay')).fadeOut(500);
//request the new value from the page (calls the GetIncompleteMissions() method in the MissionViewer.aspx.cs page)
$.ajax({
type: "POST",
url: "MissionViewer.aspx/GetIncompleteMissions",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg) {
$(clientID('MissionsDisplay')).html(msg.d);
$(clientID('MissionsDisplay')).fadeIn(500);
},
error: function (xhr, ajaxOptions, thrownError) {
$(clientID('MissionsDisplay')).html('An error occured while trying to refresh the page data.');
$(clientID('MissionsDisplay')).fadeIn(500);
}
});
}
And I have in the code bedind of an aspx page:
[WebMethod]
public static string GetIncompleteMissions()
{
return GetHTMLTable();
}
This method just grabs some data, and creates a html table - nothing too fancy. When the returned table is small (a dozen rows or less) then it works like a charm. But when it gets larger, it takes a long long time. At 100 rows it can take 5 minutes to render the table. At 1000 rows I have left it for 30 minutes and nothing will happen after the fadeout. (NB - it loads fairly quickly on the pageload, before the ajax refresh is used, so it is not the actual server side creation of the table thats the problem).
This is my first real attempt at doing something like this, so I dont know if this is the best way to do it - it was just something i pieced together that worked great when i was testing with small datasets. Now, not so much.
View 1 Replies
Similar Messages:
Mar 2, 2010
Whenever I use ASP.NET AJAX it's calling Resource.asx files many times and it's affecting site performance. How can we avoid that?
View 3 Replies
Nov 22, 2010
I have a very peculiar problem that I've been wrapping my head around and I just can't figure it out. I have an updatepanel. Inside that I have a TabContainer. And inside that I have three TabPanels, each of which has checkboxes. Sometimes (and it happens often enough that I can easily reproduce it, but strangely may not happen with the same exact steps), when I click on different tabs or click on checkboxes inside the tabpanels (basically when I do an AJAX async postback), the request takes about a few minutes, after which the request just stops. Looking at the Firefox error console, I see this popping up after a few minutes...
Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 0 Now, the asyncpostbacktimeout property for the ToolkitScriptManager is set at 360000, which is 6000 minutes, so the problem has nothing to do with that setting. In IE, I never have this problem and the AJAX requests are instantaneous and smooth, no delays. So this isn't a network or database lag issue. Something to do with how AJAX is run in Firefox. Why is it that sometimes, an AJAX request in Firefox takes a few minutes and just stops processing the request? And once again, the steps to reproduce this problem may not be the same every time, it seems random - very strange. Google searches have yielded very little help on this. I've tried things like extending the timeout property (which again has nothing to do with this), setting Response.Cache.SetNoStore() everywhere. Is there a crude workaround I can do (at this point, I'm willing to settle for a workaround). I just don't know anymore.
View 1 Replies
Apr 1, 2010
I use ASP.NET Ajax in my web site and I am monitoring the HTTP requests per each page. I am surprised by the excessive call of ScriptResource.axd with different query string variables. I am pasting a sample of HTTP trace below. The call for ScriptResource.axd take lots time percentage out of total response time. Is this by design or there is something wrong with my AJAX configuration in web.config?
[Code]....
Actually it is degrading the performance of the application. And the user experience becoming very poor in case of lower bandwidth.
View 2 Replies
Jun 13, 2010
for the past couple of days i am facing an issue where the first call from my ASP.NET 4 application (VS 2010 Web Site) hosted in IIS 7 to an XML web service is dead-slow. subsequent calls are fast until the AppDomain is restarted.
I have tried all solutions related to pre-generating the serializer assembly but nothing worked. Anyway THEN I was sure it is an IIS-only issue because if i consume the xml web service from a console .net application then all the calls are fast. its even fast from an ASP.NET web site NOT hosted in IIS instead running on the development server. SO clearly the problem is there only when my app is hosted in IIS.
View 1 Replies
Jul 30, 2010
when I access any page of my ASP.NET MVC website first time, then this first request is slow. It needs about 4-5 seconds to load. But every following request to any page is fast.When I wait some minutes or a hour then every first request is slow again. Every following request is fast.
I think that IIS 7 is compiling the code and keep it in memory. After some time it will delete it from memory so it needs to compile it again.What can I do that every first request is as fast as every following request?
(Without precompiling my source, if possible)
View 3 Replies
Mar 16, 2011
A class in my ASP.NET website needs to access a database table multiple times for every request. The database table should rarely change, if ever. Maybe a couple times a month.
In the static constructor of the class, the table is fetched from the DB and cached in a static local variable. Whenever the class needs to access the table, then, it just uses the cached, static version.
My question concerns the lifespan of this cached, static version of the table.
I understand that it's fetched the first time the class is instantiated or a static method in the class is used. But how often does this occur on the web server? What if the table changes and we want to reset this static version of the table?
Basically, I'm wondering, is this table fetched once and then only refetched each time I restart IIS? What, with regard to the site and IIS, will trigger this static class to reset, causing the static table to be refetched?
View 3 Replies
Oct 20, 2010
I implemented a custom IFilterProvider derived from FilterAttributeFilterProvider and
registered it using a Unity based dependency resolver. (Pretty much as described on
Brad Wilson's blog.) While debugging, I noticed that IFilterProvider.GetFilters on my
custom class get called a lot. I counted 4 times per request.
Is this normal or am I doing something wrong?
I have a simple project that reproduces the behavior if anyone is interested.
View 1 Replies
Jul 21, 2010
I have a web application that authenticates against AD. On the first login attemt it takes roughly 30 seconds to login. On subsequent requests the login occurs almost immediatly. I've searched all over google and this forums and noticed several people with the problem and everyone seems to have a different solution of which none work for me.
[code]...
View 3 Replies
Jan 6, 2011
I have a .NET 3.5 web application that uses SQL Server for its session state store. To improve scalability I wrote a class that implements IPartitionResolver that figures out which instance of SQL Server to use for a users session. All of this works great
and just as expected.
However, when I was debugging one day I set a breakpoint at the bottom of the ResolvePartition method to make sure the correct connection string was being returned. To my surprise this breakpoint was hit many (~5-10) times per request! The same is true about breakpoints in the IPartitionResolver.Initialize method.
Does anyone know why this is? It seems to me that you would only need to call these methods once per request. It's not like the users session is going to move to a different instance of SQL Server mid request.
View 1 Replies
Apr 8, 2010
a look at this site.maimei.chAfter 5 times opening a new site via ajax (fancybox) it crashes in IE?ne little thing is that i load a whole asp.net site via ajax in the new window. so viewstate and other overhead is there twice after. could this be the problem? if yes, why just after 5 times?.is it possible to call just the content of an specific element via ajax? may be just the innerhtml of the body element of the called site?
View 1 Replies
Aug 19, 2010
website slow on first click on home page i have not used ajax except calender control and webgroupbox from infragistics.So i plan to place all my postback button on home page in update panel. So that whole page does not make a post backAnd my application is fast on first click.
View 11 Replies
Apr 21, 2010
I have an application that runs perfectly fine and fast in IE 7. There are certain pages in the application that use the AlwaysVisibleExtender control.
However, when I run the app in IE 8, the same exact pages seem to lock up for roughly 5 seconds before they render completely. What's weird is that the page shows all the contents except for the alwaysvisibleextender and relating panel. Then after the 5 seconds the panel shows. During that 5 seconds the page cannot be navigated or scrolled. This is not really acceptable.
View 3 Replies
Aug 11, 2010
I have, what i think is a very simple updatepanel setup. I have searched and found other similar issues, but they date back to 2008 and 2009. Is the fix provided back then the only known fix now? Is there any other fixes or things.
[URL]
And here is my aspx code:
[Code]....
View 2 Replies
May 11, 2010
Throws following error at method invocation: The operation has timed out. If I test the same using SOAPUI, it works. Web Service - [URL]
View 4 Replies
Oct 5, 2010
i have to two buttons in aspx page. i added ajax functionality to the page. but now thesee two button appears twice when i run the page.
View 1 Replies
Mar 26, 2010
I have one very weird problem with ModalPopupExtender. First here is the code:
[Code]....
Situation is that after panel is UP, at the some moment I can see same panel in background on the bottom of the page. I am not sure why panel become visible??
View 4 Replies
Feb 18, 2010
So i'm new to AJAX and just installed the AJAX toolkit.
When i have tried to used any of the object there my page are really slow, it like the server is forever to compile the site and when that is done the browser shows it in a flash.
You can see here :
[URL]
This is not a problem when using only ASP.NET.
When i debug in VS2008 i can see that is looking for some random files when compiling like C:AjaxBuildAjaxServerAjaxControlToolkitToolkitScriptManagerToolkitScriptManager.cs and alot of other stuff, it goes through alot of setting there and i think that is the hold up, why it's so slow.
I have Sp1 installed, running Windows 7 64bit.
These pages are very small and standard. I basicly drag a toolkitscriptmanager, htmleditor, textbox and two buttons to the form. There isnt more.
This is the code for the first page :
[Code]....
The host has AJAX support and has installed SP1 for .NET.
View 8 Replies
Feb 23, 2011
I have a situation where I need to have close to 30 drop down lists on one form. The user also wants the autocomplete functionality. I decided to use the ASP.NET AJAX control. So that the page will load faster I hide them until they are needed. But, as more and more become visible the postback time is getting longer and longer.
I know this can be fixed, but I'm not sure how. Can anyone give me any advice, point me to some articles? Do you have a suggestion for another method of doing what I need? Maybe, I shouldn't even be using ComboBoxes for this?
View 2 Replies
Sep 20, 2010
my page contain a dropdownlist which binding many list of data with no categories. While refresh in one update panel is very slow.
View 4 Replies
Mar 1, 2010
I have a Webforms, AJAX-enabled web page which, when rendering large amounts of data, is extremely slow to load in IE (we're married to IE - no other browser options). In an attempt to determine the source of the slowness, I viewed the HTML source (about 2.5 MB) and copied all of it (except for the Ajax JavaScript calls) to a blank .html file. IE renders this file MUCH faster than when the rendering happens through .Net. This seems to indicate that the AJAX JavaScript is slowing down the display of the page. Does this sound plausible? Any recommendations on improving performance here?
I've already eliminated as many UpdatePanel controls as I can from the page, but it doesn't seem to help with render time.Update... In the HTML source, I noticed that at the bottom of the screen, a call to WebForm_InitCallback() appears. When I executed this call directly through javascript:alert(WebForm_InitCallback());, the CPU spikes for 12 seconds before it completes! This call is here because I implemented ICallbackEventHandler to try to accomplish some traditional-style AJAX handling. Looking at WebResource.axd, that WebForm_InitCallback() method iterates through the entire form and attaches some kind of events to EVERY SINGLE textbox, checkbox, radiobutton, etc. So I guess I really need to abandon ScriptManager and UpdatePanel altogether here.
View 1 Replies
Apr 22, 2010
Why the ajax control is working slow when i upload to the server? such as the custom validator is slow response in the server, the modal popup box or loading is slow to response or close up after click the ok button. It work fast in the local server.
View 2 Replies
Mar 31, 2011
[Code]....
When the popup opens, the following code is run:
.....
if (window.attachEvent) {
$("#rblQuickPick").change(function () {
//ClickQuickPick();
alert("something changed!");
});
.....
ClickQuickPick() is the code I will eventually run, but I put in the Alert for testing.
The issue is that when the popup extender opens, and I click an item, I get the alert once. If I click another choice I get the alert twice. If I click another choice I get the alert three times, etc.
What is triggering the event to repeat, and how do I stop it?
View 1 Replies
Mar 29, 2010
I have a masterpage setup, with a pageLoad in the topmost masterpage, which calls pageLoad2 for nested masterpages which calls pageLoad3 for content pages.
In my content page I have a jquery click event and in my nested masterpage I have a web user control.
Whenever I use the user control in the nested masterpage, it rebinds the click event in the content page (undoubtedly because the pageLoad3 is called again), but this makes the click event fire twice on a single click. The problem gets worse the higher up masterpages you go (eg. fires 3 times if user control from topmost masterpage is called).
how to make sure it only binds the jquery events once?
View 2 Replies
Jun 22, 2010
I have a InsertCommand function i am using to insert the dropdownlist in my updatepanel. When the Add button is clicked. It adds the record multiple times. Am not sure why it does this. Here is my code.
Dim Bank_number
As
DropDownList = UpdatePanel1.FindControl("ddlbank")Dim
NoteAccountNumber As
DropDownList = UpdatePanel1.FindControl("ddlAccount")'
UpdatePanel1.ChangeMode(FormViewMode.Insert)
lblsee.Visible =
"true"
'now collect selected information on the drop down
RelationshipTest.InsertParameters(
RelationshipTest.InsertParameters(
"bank_number").DefaultValue
= ddlBank.SelectedValue.ToString"noteaccountnumber").DefaultValue
= ddlAccount.SelectedValue.ToString'Insert into db
RelationshipTest.Insert()
Also, i was woundering if any of you might know the logic behind clearing inserted data from the dropdownlist once its inserted. I am trying to make sure data is not entered mulitiple times. Unique Indexing comes to mind but thats only on the backend.
View 3 Replies