Reputation: 4864
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!
Upvotes: 2
Views: 571
Reputation: 9127
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
Upvotes: 4
Reputation: 6955
Could it be a slow javascript? Ajax request? Is botht he asjx and aspx doing the same things?
Upvotes: 0
Reputation: 18630
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.
Upvotes: 1
Reputation:
Is there any difference between the inbuild development server and your iis server?
Upvotes: 0
Reputation: 100647
Are your .aspx pages defined as content pages for a Master page? Perhaps there is logic being executed in the Master.
Upvotes: 1