开发者

viewstate field completely missing in safari

开发者 https://www.devze.com 2023-01-29 12:00 出处:网络
This is happening in multiple versions of Safari, including 5.x It will post _EVENTTARGET=&_EVENTARGUMENT= but nothing 开发者_如何学Gofor __VIEWSTATE=

This is happening in multiple versions of Safari, including 5.x

It will post _EVENTTARGET=&_EVENTARGUMENT= but nothing 开发者_如何学Gofor __VIEWSTATE=

This is only happening in Safari, and only on one page of our site.

I can't reproduce it - we've spent days trying to.

The viewstate isnt overly huge on this page.

Thanks!


We ran into a lot of viewstate problems with version 3. Safari sets limits to the amount of data that can appear in any one field that gets posted back to the server.

The way we got around our problems was to set viewstate to span multiple input controls.

You can do this in the system.web / pages section of the web.config. For example:

<system.web>
  <pages maxPageSTateFieldLength="500" />
</system.web>

You might have to play with the value. I can't remember what the limits are for the various versions of safari. A few people have said 1k, but if I remember correctly from our testing some versions were only passing around 500 bytes.

Another option is to store viewstate server side. You can see an example of this here. You should also read this blog about potential issues. We did try this path and eventually abandoned it as it conflicted with some other encryption things we were doing.


(taking a different tact from previous answer)

To sum up what we know thus far:

  1. only safari
  2. only a particular page
  3. there is a device called StrangeLoop in the mix which removes viewstate on the way out and puts it back in when the page is posted back. It does so through some type of token value.

A couple of questions: First, is this limited to just a particular customer or set of people? I ask because it might be important that it's "only" safari.

Second, does the StrangeLoop device have some type of timeout value or traffic limit where it's token cache is garbage collected?

I can envision a scenario where a particular client goes to this page and sits for awhile (10 minutes.. longer?). In the meantime either a timeout value is met or the amount of traffic you have forces the strangeloop device to throw viewstate for this particular client out. Then when they go ahead and post back the device has no viewstate to inject back into the html stream.

It seems to me that in order for you to not have any viewstate at all, the device itself must not be injecting it. The only reason I can come up with for that would be if the token value wasn't sent by safari (unlikely as it has to be quite small) or the device couldn't locate a match in it's cache table.

Does the device have any sort of logging or metrics where you can see if it can't match an incoming token value?

A similar idea is if this page has some ajax going on. Does the device send a different token back for each request or does a single client browser retain the token for the entire browsing session? If it sends a different token.. then it might be that safari isn't properly updating itself client side with the new token value. Although this path ought to be pretty easy to duplicate.

0

精彩评论

暂无评论...
验证码 换一张
取 消