We have an aspx page that needs a cookie in order to start. Before redirecting to that page, we create the cookie and it is given on the response then the redirect to the page.
Form form = new Form {
FormID = dalObject.FormID,
PageName = dalObject.PageName,
ViewPageName = dalObject.ViewPageName };
HttpCookie cookie = new HttpCookie("FormCookie");
cookie.Expires = DateTime.Now.AddMinutes(1);
if (dalObject.FormID==(int)Forms.SP_APP_FORM)
{
cookie.Values.Add("ApplicationRepositoryID",GetEncryptedToken(applicationRepositoryID.ToString()));
cookie.Values.Add("UserDirectoryID", GetEncryptedToken(userDirectoryID.ToString()));
cookie.Values.Add("FormID", GetEncryptedToken(dalObject.FormID.ToString()));
if (applicationFormID.HasValue)
cookie.Values.Add("ApplicationFormID", GetEncryptedToken(applicationFormID.ToString()));
}
form.PageCookie = cookie;
return form;
The problem is that in the development environment it is working just fine, in production it is working too (for them), but if we try the production site, it does not work (from our development computers). We suspect the cookie doesn't get created. And this happens on 2 of 3 computers of the development. on one of them it is working. We tried to delete the cookies, clear cache, but no result.
Any ideas? Thanks