IIS 5 & IIS 6
Millions of http 302 Code Entries
Last post Mar 12, 2009 01:50 AM by ziadn
Mar 11, 2009 05:18 AM|ziadn|LINK
I am getting millions of 302 status code (redirection) entries in my IIS log files.
This occurs on custom built login pages: When employees try to log into applications, enter a user id and password and submit, the page seems to refresh many times per second, indefinitely, thus the huge logs (100 GB +) mainly of 302 code entries.
- This problem doesn't happen to all users. Actually, it seems to happen randomly to random users.
- We are using IIS 6
- This occurs in .net applications we developed (see code snipet below)
- We are using a proxy
In our login page, we have the following line of code which we use to redirect:
Note that initially users click on, say,
http://intranet/myapp/default.aspx which redirects them to a login screen, which contains the above code to take them back to the default.aspx page.
Since it works fine most of the time (95%+) am I right to assume it is not a coding problem?
Can someone please tell me what seems to be the problem?
This is a typical log file entry:
#Fields: date time s-sitename s-computername s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs-version cs(User-Agent) cs(Cookie) cs(Referer) cs-host sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken
2009-03-06 14:06:46 W3SVC1 INTRANET 18.104.22.168 GET /myapp/login.aspx - 80 - 22.214.171.124 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.1;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.30;+.NET+CLR+3.0.04506.648;+.NET+CLR+3.0.4506.2152;+.NET+CLR+3.5.30729)
http://intranet/default.aspx intranet 302 0 0 389 1137 15
Mar 11, 2009 08:20 AM|tomkmvp|LINK
Perhaps the Response.Redirect is not necessary. Look at this example using FormsAuthentication.RedirectFromLoginPage ...
Mar 12, 2009 01:50 AM|ziadn|LINK
Thanks Tom, I'll give RedirectFromLoginPage a try.
We are using GetRedirectUrl because we want to redirect the user to the URL originally requested.
What puzzles me is why it would work most of the time, and just "hang" randomly and very rarely...