0
votes

I got a strange phenomenon when using Response.Redirect in my asp.net app, here is the thing:

Response.Redirect("~/somepage.aspx");  

when the page is just in root of virtual dir, it will take almostly 15 milliseconds to get(find) the page

Response.Redirect("~/somedir/somepage.aspx"); 

when I move the page to a dir, it will take almostly 2 seconds to get(find) the page, the time is unbearable for browsing website, and I tried lots of ways to fix it eventually still don't know why this happen, could you nice guys give me any addvices, thanks a lot. btw, somepage.aspx have nothing in it, except for two words in body node: "help me".

p.s. there are 72 aspx pages in somedir, about 10 aspx pages in root dir.

I found some clue, I create a new dir newdir with only somepage.aspx in it, then the time spent for getting the page is 15 milliseconds again, so the test leads me to the this conclusion: the time Response.Redirect works is based on the number of files in dir, mayber I 'm wrong about it, but that's the only fact I got.

1
it could be a virus problem such as desktop.ini and folder.htt these virus can slow down performance simple search and delete while show all files checked in tools>option>view secondly delete web folder in C:\WINDOWS\web - skhurams
I take your advices into serious consideration, thank you #skhurams #Siva Charan - lotus_misser
Works on my machine. Can you provide a minimal working sample that reproduces the problem? - Heinzi
use precompile, my problem is solved, thanks to all - lotus_misser

1 Answers

1
votes

As far as I know, it is not the problem with Response.Redirect.

Actually problem would be based on the content & controls on the page, which is taking time to load all the information.