httpCookie cause the page not to load
I'm using VS 2010, vb.net and asp 3.5. I have a simple default.aspx page that has
Dim ctx As HttpContext = HttpContext.Current
Dim cookie As HttpCookie = ctx.Request.Cookies("SessionGUID")
Me.lbl1.Text = cookie.Value.ToString
the page loads fine when running it from within VS, but when i build the site and run the page, it doesn't load.. it doesn't give me an error, but nothing shows up.
T开发者_开发知识库his is what the view source looks like
HTML>HEAD> META content="text/html; charset=windows-1252" http-equiv=Content-Type>/HEAD> BODY>/BODY>/HTML>
I took out the < in the tags so that it would display here...
If i take out the Me.lbl1.Text = cookie.Value.ToString the page loads fine.. All i'm putting to the page is some text and the label control.
anyone have any ideas
well.. i didn't figure it out.. but did somethig different that does work.. not sure if it's better or worse.
I took out all the plumbing for the session module and instead created a session in the global.ascx file in the session_start... maybe that is where it should have been all along. from that point i was able to change teh spots where i was using the cookie to the session.
works as far as i can tell.. more testing will tell.
精彩评论