.aspx pages running EXTREMELY slow on IIS7

Hi Experts,

I have an application  which is made in VB.net 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 .
Nilesh HavireBusiness ITAsked:
Who is Participating?
Nilesh HavireBusiness ITAuthor Commented:
Issue has fixed by indexing
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.
Nilesh HavireBusiness ITAuthor Commented:
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
Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

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.
Nilesh HavireBusiness ITAuthor Commented:
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
Nilesh HavireBusiness ITAuthor Commented:
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
Nilesh HavireBusiness ITAuthor Commented:
fixed by indexing
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.