开发者

Extremely Difficult Problem with ASP.Net 4.0 WebForms app using Routing

I have a completed app running in a QA environment. Everything works fine under most circumstances. If you hit a plain URL (no identifying information in the URL), you see an intro page with a button (generated by an asp LinkButton control) that posts back and directs you to another page. The markup looks the same when it fails and when it doesn't.

When such a URL is followed from, e.g., Word and the default browser is IE, the intro page loads f开发者_如何学运维ine, but clicking the button causes an error. When not debugging, this behavior occurs every time. While debugging, the error occurs only ~ 1 in 10 times (closing the browser instance and starting over every time).

When the error occurs, the intro page Page_Load fires and IsPostBack is false. Somehow, instead of a post, a get is being issued.

When I run fiddler to try to analyze the actual calls (can't use firebug because it never happens using Firefox), everything works every time.

I don't know whether this issue has anything to do with routing, and I've no idea even what to look at next. The strange thing is, when I debug, the intro page doesn't fully load every time. Only about 1 in 3 times does it fully load even if I've just cleared browser cache. When I run it through fiddler, it fully loads and works fine every time.


This had to do with cookieless sessions. Changing
<sessionState cookieless="AutoDetect" mode="InProc" timeout="20" />
to
<sessionState cookieless="UseUri" mode="InProc" timeout="20" />
solved the problem.

AutoDetect just seemed to cause random extra requests to be fired. I don't think there's any way it could play nicely with routing.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜