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!
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