tags:

views:

137

answers:

5

Hi,

First off I would like to apologize beforehand, in case this turns out to be a really dumb question. I just can't wrap my head around it.

I have a C# ASP.NET website running with .net 2.0 Both on my local machine, as well as on production server it runs terribly slow.

Even if I disable ALL the code, it still runs slow to serve the page.

However, if it is a .ashx, instead of a .aspx it executes immediately; even if it executes the same things.

Any ideas? Truly appreciated!

+1  A: 

Are your .aspx pages defined as content pages for a Master page? Perhaps there is logic being executed in the Master.

p.campbell
Yes, and I have disabled the master page, and executed the page without the master page. This gives a faster result, by half even, but again, slow slow slow.Maybe like 15 seconds before even starting to return a response to browser.
Theofanis Pantelides
The ANTS profiler seems always to move into the NATIVE parts of the code. HTMLWriter etc
Theofanis Pantelides
A: 

Is there any difference between the inbuild development server and your iis server?

Mark
one is 64bit iis7, the other is 32bit iis6problem exists on both.
Theofanis Pantelides
+1  A: 

Have you tried creating a new, quick Website on your local server to test the speed? Try creating a quick asp.net website and test it on the local server. If this new website goes fast, it may be something within your existing website that you're not aware of.

contactmatt
A: 

Could it be a slow javascript? Ajax request? Is botht he asjx and aspx doing the same things?

rball
+3  A: 

if your ashx page loads faster than the aspx, it might be related to the HttpModules or aspx page lifecycle custom code running on your application.

Check if you have anything in the Application_BeginRequest or other events in the lifecycle that could be writing to files (logs), connecting to slow databases or a authentication authority (like AD) that might be going thru the network and taking longer than usual to process.

Disable all the HttpModules in the web.config one by one and test. Check this great article to get more info

F.Aquino
was just about to post that article by Omar !!
ram
I have completely disabled the _BeginRequest, and actually the whole of the global.asax and no difference. I am looking at the httpModules article now - Thanks!
Theofanis Pantelides
I don't know if this is actually the answer, but I'm giving you the checkmark (at least for now) because the article is godsend.
Theofanis Pantelides