>Hi everybody,
>
>I'm trying to go to the root of the problem. We're creating an ASP.NET MVC application.
>
>I see the following code
>
>
>DateTime expirationDate = DateTime.Now.AddMinutes(lockTime);
>
> System.Web.HttpCookie timeoutCookie = new System.Web.HttpCookie(
> SysManagerConstants.AUTH_TIMEOUT_COOKIE_KEY,
> expirationDate.ToLongTimeString());
>
> timeoutCookie.Expires = expirationDate;
>
> timeoutCookie.Path = "/";
>
> filterContext.HttpContext.Response.Cookies.Add(timeoutCookie);
>
>Under certain scenarios I'm getting an error (when I am debugging the code) that the filterContext can not be modified after it was being sent.
>
>I am not sure how to prevent this situation, e.g. that code executing in some sort of a loop.
>
>So, the idea is to prevent this situation of appending something when the context already sent.
>
>Thanks in advance.
Where is this code ? And do you see the problem when you are *not* debugging ?