ASP.ner Cookie error

B

Bantha

I keep getting thei error and can fin out why

Response is not available in this context.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Response is not available
in this context.

Source Error:


Line 25: CookieUserID.Expires = Now.AddMinutes(30)
Line 26:
Line 27: Response.Cookies.Add(CookieUserID)
Line 28:
Line 29: CookieUserAuthority = New HttpCookie("Authority")


Source File: C:\Documents and Settings\PASCAL WORK\My Documents\Visual
Studio Projects\ITAssets\APP_LAYER\Security.vb Line: 27

Stack Trace:


[HttpException (0x80004005): Response is not available in this
context.]
System.Web.UI.Page.get_Response() +2025449
APP_LAYER.CLS_Security.Begin_session(Int32 EmployeeID, Int32
Authority) in C:\Documents and Settings\PASCAL WORK\My Documents\Visual
Studio Projects\ITAssets\APP_LAYER\Security.vb:27
ITAssets.Login.BtnLogin_Click(Object sender, EventArgs e) in
c:\inetpub\wwwroot\ITAssets\Login.aspx.vb:56
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEvent(String
eventArgument) +107

System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
+33
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,186
Latest member
vinaykumar_nevatia

Latest Threads

Top