302 redirects rather slowly (IIS6)

I have a website that has weird behavior:

When a page that requires authentication is hit, we process it as follows:

  • The http module detects the need for authentication =>

returns status 401:

context.Response.StatusCode = 401;
// Prevents any other content from being sent to the browser
context.Response.SuppressContent = true;
// Directs the thread to finish, bypassing additional processing
context.ApplicationInstance.CompleteRequest();
  • redirection to auth form is detected and redirection is carried out to the corresponding registration form:

Redirect Code:

context.Response.Redirect(url, false);
// Directs the thread to finish, bypassing additional processing
context.ApplicationInstance.CompleteRequest();

When a site with this code runs on IIS7, no problems are observed. But with IIS 6, the login form takes 2 minutes and is calculated for download (with IE, Firefox, sometimes it works fine with Chrome, but not always).

, (302: ) , "ServerDoneResponse" 2 .

CompleteRequest(), , , .

- ?

: , Windows 2003 R2 SP2

# 2: , Fiddler:

ClientConnected:    14:27:39.219
ClientBeginRequest: 14:27:39.297
GotRequestHeaders:  14:27:39.297
ClientDoneRequest:  14:27:39.297
Determine Gateway:  0ms
DNS Lookup:         0ms
TCP/IP Connect:     0ms
HTTPS Handshake:    0ms
ServerConnected:    14:27:39.250
FiddlerBeginRequest:14:27:39.297
ServerGotRequest:   14:27:39.297
ServerBeginResponse:14:27:39.328
GotResponseHeaders: 14:27:39.328
ServerDoneResponse: 14:29:48.867
ClientBeginResponse:14:29:48.867
ClientDoneResponse: 14:29:48.867

Overall Elapsed:    00:02:09.5694285
+4
1

SuppressContent = true, II6.

+1

All Articles