J
JThomas
Hello!
I'm having trouble with a page apparently causing my client's Safari
browser to time out. I don't actually have access to a Mac & Safari,
and haven't been able to physically see this duplicated, but this is
the descrip of the problem:
2. Timeout - never sent to next page (submit button is working, but
browser never retrieves next page).
This is what's happening behind the scenes:
Program:
1. Page with a form on it (part 1 of 4 pages of forms).
2. On form submit, PostBack occurs, data is validated, and if all good,
added to a DataTable stored in Session.
4. Response.Redirect to next page.
5. Next page has another form (part 2) - some values may be
prepopulated as suggestions based upon some entries from the form on
page 1 (which are stored in DataTable in Session). Any fields filled
out here and submitted are validated and added to the DataTable stored
in Session, and then a Response.Redirect to the next page (and so on).
The timeout appears to be happening at step 4, above. I've got a global
errorhandler set up that emails me every detail I can get when an error
occurs, but I haven't received any at the times my client is
experiencing his timeouts.
Now I've gone and looked at some of our server error logs, which turned
out to be particularly interesting. I've now learned that what
Response.Redirect seems to do is send a status code 302 (Found -
temporary redirect) to the browser, plus the location of the page to
redirect to. Generally this means the browser redirects, and the next
status code is 200 (OK) at the new page. This is what happens with
Windows browsers (IE, Firefox, etc), at least.
Safari seems to not get the 302 correctly. It registers a 400 (Bad
Request), and never redirects - so I end up seeing a string of 400s
where I assume my client has tried multiple times to submit the form
and ends up timing out.
For example - with a windows browser:
-----------------------------
GET /mypage1.aspx 200 (arrives at page)
POST /mypage1.aspx 302 (submits form, is told to redirect to
mypage2.aspx)
GET /mypage2.aspx 200 (arrives at next page)
-----------------------------
But with Safari:
-------------------------------
GET /mypage1.aspx 200 (arrives at page)
POST /mypage1.aspx 200 (not a 302?)
POST /mypage1.aspx 400 (ack!)
POST /mypage1.aspx 400 (ack! Must have refreshed or tried again?)
GET /mypage1.aspx 200 (start over?)
POST /mypage1.aspx 400
POST /mypage1.aspx 200
GET /mypage1.aspx 200
POST /mypage1.aspx 400
POST /mypage1.aspx 302 (finally!!?!)
GET /mypage2.aspx 200 (page2!)
POST /mypage1.aspx 400 (why back here?)
POST /mypage2.aspx 200 (ok, back to page 2, but with POST, not GET)
POST /mypage2.aspx 200
POST /mypage2.aspx 200 (several POST 200s in a row... noted that
sc-bytes seems to be increasing by about 16000 with each)
POST /mypage2.aspx 400 (this looks familiar!)
POST /mypage2.aspx 400
POST /mypage2.aspx 400
POST /mypage2.aspx 400
--------------------------
Anyway, it seems the client was able to get to page 2 of the form after
some difficulty, but never quite made it to pages 3 and 4.
In any case, I haven't been able to duplicate the problem myself, and
don't have access to a Mac with Safari to do much testing. If anyone
has any ideas, please feel free to pass them on! I may be barking up
entirely the wrong tree with the Server Logs, but it's about the only
place I can find actual evidence of this problem occuring.
Cheers,
John
I'm having trouble with a page apparently causing my client's Safari
browser to time out. I don't actually have access to a Mac & Safari,
and haven't been able to physically see this duplicated, but this is
the descrip of the problem:
1. Client, using Safari, fills out a form on one page, submits (POST).From Client's Point of View:
2. Timeout - never sent to next page (submit button is working, but
browser never retrieves next page).
This is what's happening behind the scenes:
Program:
1. Page with a form on it (part 1 of 4 pages of forms).
2. On form submit, PostBack occurs, data is validated, and if all good,
added to a DataTable stored in Session.
4. Response.Redirect to next page.
5. Next page has another form (part 2) - some values may be
prepopulated as suggestions based upon some entries from the form on
page 1 (which are stored in DataTable in Session). Any fields filled
out here and submitted are validated and added to the DataTable stored
in Session, and then a Response.Redirect to the next page (and so on).
The timeout appears to be happening at step 4, above. I've got a global
errorhandler set up that emails me every detail I can get when an error
occurs, but I haven't received any at the times my client is
experiencing his timeouts.
Now I've gone and looked at some of our server error logs, which turned
out to be particularly interesting. I've now learned that what
Response.Redirect seems to do is send a status code 302 (Found -
temporary redirect) to the browser, plus the location of the page to
redirect to. Generally this means the browser redirects, and the next
status code is 200 (OK) at the new page. This is what happens with
Windows browsers (IE, Firefox, etc), at least.
Safari seems to not get the 302 correctly. It registers a 400 (Bad
Request), and never redirects - so I end up seeing a string of 400s
where I assume my client has tried multiple times to submit the form
and ends up timing out.
For example - with a windows browser:
-----------------------------
GET /mypage1.aspx 200 (arrives at page)
POST /mypage1.aspx 302 (submits form, is told to redirect to
mypage2.aspx)
GET /mypage2.aspx 200 (arrives at next page)
-----------------------------
But with Safari:
-------------------------------
GET /mypage1.aspx 200 (arrives at page)
POST /mypage1.aspx 200 (not a 302?)
POST /mypage1.aspx 400 (ack!)
POST /mypage1.aspx 400 (ack! Must have refreshed or tried again?)
GET /mypage1.aspx 200 (start over?)
POST /mypage1.aspx 400
POST /mypage1.aspx 200
GET /mypage1.aspx 200
POST /mypage1.aspx 400
POST /mypage1.aspx 302 (finally!!?!)
GET /mypage2.aspx 200 (page2!)
POST /mypage1.aspx 400 (why back here?)
POST /mypage2.aspx 200 (ok, back to page 2, but with POST, not GET)
POST /mypage2.aspx 200
POST /mypage2.aspx 200 (several POST 200s in a row... noted that
sc-bytes seems to be increasing by about 16000 with each)
POST /mypage2.aspx 400 (this looks familiar!)
POST /mypage2.aspx 400
POST /mypage2.aspx 400
POST /mypage2.aspx 400
--------------------------
Anyway, it seems the client was able to get to page 2 of the form after
some difficulty, but never quite made it to pages 3 and 4.
In any case, I haven't been able to duplicate the problem myself, and
don't have access to a Mac with Safari to do much testing. If anyone
has any ideas, please feel free to pass them on! I may be barking up
entirely the wrong tree with the Server Logs, but it's about the only
place I can find actual evidence of this problem occuring.
Cheers,
John