ASP.net Usercontrol caching viewstate across users?
I have a usercontrol with asp:textbox controls on it that also performs postbacks. If two users, who a开发者_StackOverflow社区re both identified by a different session variable, postback the page within the same second, one user will see the other user's viewstate values in the text boxes. I have validated that this happens by setting a textbox, a session variable, and a cookie to the same value (the same value that identifies the user) and writing to the log when all three don't match. The text box's value is the one that is logged as the other user's value.
ASP.net 3.5, IIS 6
Has anyone experienced this issue.
The UserControl itself shouldn't be caching anything across users. You must be doing something with ViewState yourself to cause this - perhaps at a lower level, like when saving the viewstate to a DB (if you have custom code for that). You'd have to post all the relevant code for anyone to figure out what's wrong.
Is there a proxy server involved in the equation? I have seen this exact symptom where a proxy server was serving up cached pages from other users.
精彩评论