.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Extremely slow Postback or Redirect

Posted By:      Posted Date: September 18, 2010    Points: 0   Category :ASP.Net
I have been coding simple ASP.NET pages for quite a while, but this problem is stumping me. I have a page that is almost purely HTML except for a few ASP.NET buttons and labels - as you can see in the code below. Problem: When I click on a button (that is not set up to do anything) or hit refresh, the page reloads twice at a normal rate and then the third time (and everytime therafter) it takes about 40 seconds to reload. On the first two reloads, some of the images don't always show up (blank placeholders) and sometimes they show a broken link placeholder. If I refresh the page too many times (10 or so) I get: HTTP 403.9 - Access Forbidden: Too many users are connected Internet Information Services When I click on a button that has a response.redirect, it takes 40 seconds to load the page even if it is the first button I have clicked. One of the buttons points to a page that I have not yet created and clicking that button takes 40 seconds to tell me the resource does not exits. Platform: The webpage is running on a Win XP Pro, box with 2GHz, 256RAM and IIS6 and SP2. On the web.config file all I have done is turn off custom errors and turned off debug. I get the same result hitting the page from the webpage server or from different machines. I am the only person hitting the website. I tested putting the page on a different server (XP Server 2003 box

View Complete Post

More Related Resource Links

Response.Redirect slow


I'm in the middle of migrating servers and on the new server Response.Redirect is extremely slow. It takes around 20 seconds for the browser to get the redirect. This is something that was quick on the existing server. It's an ASP.NET 2.0 application, both servers are running IIS6.

Additionally, if I "manually" do the redirect, it's fast. For example:

Existing way:


takes around 20 seconds on the new server

New way:

Response.Status = "302 Moved Temporarily";
Response.AddHeader("Location", url);

is fast on the new server.

Any ideas why Response.Redirect would be so slow on the new server?

Datagridview painting "EXTREMELY SLOW" on new PC

Hi, I have a appliation I wrote in .net 2.0 (VS 2005) and on all PCs except one it runs great, but on this one laptop (a brand new Dell XPS 1530) the Datagridview paints so slow when scrolling or resizing that you can see each row paint as if in slow motion.  It's so bad I would be extremely hesitant to relase the application as I know someone would complain.   Has anyone else seen this issue?  It's only happening on certain PCs.  The PCs in question are all up to date via windows update, so they have the same versions of everything.  The laptop has a Nvidia 8600GT chip in it with the latest drivers and I actually have the same drivers on some of the PCs where the grid is fast.   Thanks,   Tony Caduto AM Software Design Home of Lightning Admin for PostgreSQL and MySQL http://www.amsoftwaredesign.com

Extremely Slow Page Loads

Thought I would reach out to the experts and see if anybody might be able to point me in a direction as I do not know where to turn next. Any and all help is greatly appreciated. All of a sudden page load times on the primary web app in my SP2007 farm are extremely slow. Making the site almost unusable. Network performance seems fine as does SQL -- no obvious errors in the logs. The problem happens intermittently. Environment: •  Win2k3 SP2 servers    •  1 WFE (VM)        •  SharePoint 2007 SP2 w/ JUN 2010 cumulative update installed.        •  Most recent WU patches applied about 10 days ago (suspected cause?)      •  1 SQL 2005 (metal)        •  The content database is 20.7 GB, so it fall withing BPs.         •  My DBA has said the DBs do not look overly fragnmented •  1 site collection •  4 web apps •  The VM environment is VMWare vSphere. Search indexing (full) is disabled; All app pools have been recycled; Warmup scripts have been run; and the server has been been rebooted. Have anyone run across anything like this before? Can you point me in a direction? Thanks in advance.

Scrolling through lists extremely slow

Hi , When viewing lists in SharePoint 2010 it's abnormally sluggish when scrolling especially with the scroll wheel on the mouse. If you grab the scroll bar with your mouse its abit faster but when scrolling with the wheel it jumps up and down. Viewing a list with 500 items on a page (which worked perfectly without issue in MOSS) is unbareable. Also when trying to edit the page that this list view is on, it takes for ever to load. Seems like a javascript issue, has anybody else experienced the same issue and know how to fix it? Note: the list with 500 items has been migrated from MOSS by upgrading a MOSS 2007 DB if that makes a difference. I have tested with a brand new list and the issue still occurs

Report exported to Excel 2007 is EXTREMELY slow once a filter is applied.


I am exporting a 12,000 row, 20 column report to Excel from SSRS 2008.  Once opened in Excel, everything is fine.  If I further filter the data through Excel (no external data connections) performance degrades.  If I filter down to say 20 rows, it nearly completely bogs down my entire PC.  I've emailed this spreadsheet to several others, who then experience the same issue.

If I export this same set of data from a different BI tool, such as Microstrategy, there are no performance issues what so ever.

<%= Html.DisplayFor(item=>item.Property) %> extremely slow


I am passing a List with Model objects to my view and display them using

<%= Html.DisplayFor(i=>item.Property) %>

.and DisplayTemplates to show the properties. However, it takes second to render the page? How come it is so extremely slow? Am doing something wrong?

SSIS - Data Flow Task Reads Fast But Importing the Output,Update & Deleting Extremely Slow & runs lo


Good day, I need help please.

In my source I read about 4mil records in a matter of seconds But Importing the Output to the Same Table takes about an 1 hour to update.

My Source Read is the Same Table to which i'm Importing, Updateing,Deleting

Importing: Table Lock & Check Constraints are checked

Please any ideas & suggestions will be great.

Thank You

Ajax redirect without postback ?


Hi all.

I'm beginner developer.

How to redirect without postback?

I do http://forums.asp.net/p/1099664/4180179.aspx#4180179

but get error

                         throw new Error('ASP.NET Ajax client-side framework failed to load.'

and use this

<meta http-equiv="Page-Enter" content="blendTrans(Duration=0.5)">
<meta http-equiv="Page-Exit" content="blendTrans(Duration=0.5)">

it's still postback.


<asp:HyperLink ID="HyperLink2" runat="server" CssClass="mainlink" NavigateUrl="~/Index.aspx">Home</asp:HyperLink>
<asp:LinkButton ID="LinkButton1" runat="server" CssClass="mainlink" PostBackUrl="~/Index.aspx">Index</asp:LinkButton>
<asp:HyperLink ID="HyperLink1&q

ORDER BY extremely slow in SQL 2008 R2


We have been running our databases on Server 2003/SQL 2005, and recently set up a new server running Server 2008 R2/SQL 2008 R2. For the most part, performance has been just fine. However, there is a particular query that runs quickly (<1 sec) on 2005, but very slowly (over 30 minutes!) on our new setup. The query is:

 SELECT CT.ClearingUniqueTradeID, TradeID From Polaris.Bridge.TradeClearingTrade TCT
 INNER JOIN [Polaris].[Clearing].[ClearingTrade] CT ON CT.ClearingTradeID = TCT.ClearingTradeID
 WHERE TradeDate = '2010-06-11'
 AND ClearingTradeStatusID = 4
 ORDER BY ClearingUniqueTradeID

The query returns about 20,000 rows. If we remove the ORDER BY, it runs in less than a second. I've run the Tuning Advisor against the query and it suggested a couple of indices - these make the query fast again, but I don't think that should be necessary merely to sort 20k rows of numerical values. SQL 2005 did fine without them.

I did apply CU4 to see if there were a

jQuery $(document).ready() and ASP.NET Ajax asynchronous postback

Many call it the ASP.NET jQuery postback problem, but using the technique below should make it no problem anymore. $(document).ready() isn't called after an asynchronous postback. What this means? You lose the functionality that should be executed within $(document).ready() after an UpdatePanel rendered its contents after an asynchronous postback.

jQuery live() and ASP.NET Ajax asynchronous postback

The issue is that normally $(document).ready() is called when the DOM is ready to be manipulated. But this doens't happen after an ASP.NET Ajax asynch postback occurs.

This means that the initial jQuery bindings won't be automatically available after the asynchronous postback is over. I underline "automatically" here because my last post describes more possibilities, how this issue can be worked around.

Maintain HTML Radio Button Selection Inside GridView After Postback

Long time ago I wrote an article about getting the value of the selected RadioButtons inside the GridView control. The code did not addresssed the postback issue which means that the selected radio button was cleared after the postback occurs.

VS 2010 Pro is slow



I was wondering if anybody else is finding VS 2010 extremely slow loading a solution - and it pretty much renders the rest of the machine useless until loaded. Everything is slowed to a halt.

I upgraded from VS 2005 - now I think I made a terrible mistake. I cannot afford to try and load 2 solutions simultaneously.

The machine is a Core2 Duo E8400, 3GB of RAM, WinXP SP3. Max I can go to is 4GB. Would upgrading to a 64-bit OS really be worth it (actually only to get 8GB of RAM)?

I'm hoping someone else has found a solution to this particular problem.



Automatically redirect to HTTPS and check if SSL is active



I've set in the web.config:

    <!-- User Authentication -->
    <authentication mode="Forms">
      <forms loginUrl="~/Page/View/Content/Login.aspx" timeout="2880" requireSSL="true" />

This works fine. If there is no ssl connection, the login form doesn't continue. But I would like to check if ssl is active (in codebehind) and, if it's possible, to automatically the user to the https page if he's currently on http. (I could do this job by manually redirect with page.response("https://url.../login.aspx"); but this is not really generic. For example if the webapp is moved to another domain it doesn't work anymore... I'm looking for something like: FormsAuthentication.RedirectWithSSL(); or so... :D)


Profile not being save after redirect.



I am trying to save values into a Profile on Page1, then redirect to Page2 and access those values.  However, after the page redirects the profile values are blank as if they were never saved.   When stepping through the code I can see that they are being save on Page 1.

I suppose I could use session variables to store the information but I don't understand why saving the profile doesn't work.

private void PayWithPayPal()
        ProfileCommon profile = this.Profile;

        if (Global.CurrentUserName.Length > 0)
            profile = this.Profile.GetProfile(Global.CurrentUserName);
        profile.FirstName = uxFirstNameShipping.Text;
        profile.LastName = uxLastNameBilling.Text;
        profile.ShippingAddress.AddressLineOne = uxAddressLineOneShipping.Text;
        profile.ShippingAddress.AddressLineTwo = uxAddressLineTwoShipping.Text;
        profile.ShippingAddress.City = uxCityShipping.Text;
        profile.ShippingAddress.State = uxStateShipping.Text;
        profile.ShippingAddress.ZipCode = uxPostalCodeShipping.Text;

        Response.Redirect("~/expresspayment.aspx", false);

protected void Page_Load(object sender, EventArgs e)
        ProfileCommon p

Redirect to a mobile page

Hi please can anyone help? I have a simple website with a home page called defaut.aspx, also I have a page with in this site called mobile.aspx. My question is, bearing in mind that I posses very little knowledge of VB, what code do I need to place in the default.aspx to detect what kind of device someone is using and redirect them to the mobile page (mobile.aspx)? This needs to be quite up-to-date preferably for blackberry and nokia devices?


Detecting PPC device on startup page to redirect?

I was wondering (since a search didn't find any posts) if there is a way for my startup page to detect what kind of device (PocketPC or web browser specifically) is loading the page and if it is a PocketPC, then redirect to the mobile pages? I will only be using PocketPC's exclusively as a mobile device.

Thanks for any suggestions!
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend