Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IIS - Unexplained 302 response code

Tags:

asp.net

iis

What scenarios cause IIS to generate a 302 besides response.redirect? I'm working on an legacy ASP.NET app and it's generating 302s in IIS. The thing is, the code doesn't make any response.redirect calls. I don't know how to debug this thing. Could losing session generate a 302? I'm totally lost.

like image 706
Big Daddy Avatar asked Sep 16 '26 03:09

Big Daddy


2 Answers

Check at the IIS level, not ASP.NET level.

Check the IIS management console. Possible options are:

  • "URL rewrite module"
  • "HTTP redirect" (under the website settings, for IIS7)
like image 194
Serge Shultz Avatar answered Sep 17 '26 17:09

Serge Shultz


It can happen if you return a CSS file in ASP.NET over http when it should be over https, ive seen that happen in the past. Also if any web services tied into that application that are getting hit or making passes that fail, that could cause it too. Just shooting from my hip and trying to recall the last time I seen those issue's arise.

like image 20
TGarrett Avatar answered Sep 17 '26 17:09

TGarrett