.aspx pages running EXTREMELY slow on IIS7

Posted on 2012-09-13
Last Modified: 2015-04-21
Hi Experts,

I have an application  which is made in and it's running under IIS 7 on Windows 2008. It's running EXTREMELY slow on this IIS.

A page which usually takes 1-3 seconds to load is taking 10 to 12 seconds!!!, When I run a completely blank .aspx page, or only hello word, page still takes more than one second to load, even after compiling and refreshing the browser several times. As per my findings and testing I think there is a serious issue in IIS A default.html load in approx 1 sec here but same file I just reanme it to default.aspx loads in 10 secs, as per my think issue is only with aspx pages, but I am not getting any solution yet

Thanks in Advance .
Question by:Nilesh Havire
    LVL 8

    Expert Comment

    Check your server logs.  (Event Viewer) If you aren't logging, then turn on logging in your IIS server.  You may find some that some feature or tool is timing out.

    Also, check your global file or config file on your project.  It could be there is some troubled code sitting in global.asax, or extra things loaded in your webconfig, either of which could cause have extra stuff that would effect each page load, even if you run only a hello world page.

    Other than that, I would recommend checking for updates.

    Author Comment

    by:Nilesh Havire
    Hello  hpdvs2,

    Thanks for Your reply, Can you please have look on my Global.asax and web.config file, PFA for same,

    Please suggest me if anything need to change
    LVL 8

    Expert Comment

    First off, change your password to your database.  your connectionstring in Web.Config still had it in the file.   Though perhaps that is a fake that you changed it to when posting the file.

    In your globabl.asax, this looks like the only line that could potentially cause your issue.

    obj.ExecQuery("update lms_guest set is_active='No' where email in(Select email from lms_loginmaster)")

    Open in new window

    However, This should only get fired the first time a page loads for a given connection.  But depending on your setup, If you have Cookies turned off for instance, or are starting with a new browser (or tab depending on the browser/settings)

    Based on your code, it looks like you might be expecting Session_Start to get executed the first time something gets posted to the session, but in actuality, it is the first time they view a page on the site.  This is based on the the code expecting an email address in your lms_loginmaster, which at a session start doesn't seem to make sense.  It seems your presuming an email was put in their probably by other code.  

    Perhaps you should see how many "email"'s exist in lms_LoginMaster.  I'm guessing it may be quite a lot.  There are probably also a lot in lms_guest.  since the query essentially gets looped based on the number of records in lms_guest * the number of records in lms_LoginMaster.

    Author Comment

    by:Nilesh Havire
    Hi  hpdvs2,

    Nice view ! Thanks for Your reply,  we have 605 rows in lms_loginmaster and 7983 rows in lms_guest table, I have checked this is executing query 605 time because we have 605 entries in lms_loginmaster,  does it affect much too slow down the application ?

    Thanks in Advance

    Author Comment

    by:Nilesh Havire
    Can you please suggest me for my Issue, I have removed that query from asax page & magic Site working is too fast all pages are loading within second but we found issue after remove that query all guest users are unable to register on site, no records write in lms_guest table, I found same query in masterpage.master,

    Following are the scenarios:
    1. When a user register as a demo user in our site the entry is recorded in lms_guest.
    2. Once user purchase any product in application he become registered user and entry recorded in lms_loginmaster.
    3. To make the difference between the users entries in both the tables, we make user inactive in lms_guest.
    4. i am wondering For the same purpose Previous guy used  that query.

    is there any way to fixed this issue

    Thanks in Advance

    Accepted Solution

    Issue has fixed by indexing

    Author Closing Comment

    by:Nilesh Havire
    fixed by indexing

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (…
    Prologue It is often required to host multiple websites on a single instance of IIS, mostly in development environments instead of on production servers. I am sure it is not much a preferred solution on production servers but this is at least a pos…
    This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
    This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now