Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3486118
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:59:25+00:00 2026-05-18T10:59:25+00:00

I am having a cookie problem in the below example. the cookie does get

  • 0

I am having a cookie problem in the below example. the cookie does get created and when i put a debug point after its creation i can check whats in the cookie with a watch. however, when i restart the website, the cookie is still there, but has become empty and will not create the model (all fields empty are null.)

I looked around and found bugs relating to using response.Cookie and having no expiry date, but i changed things around and it stays empty. Am i doing something wrong or is this because im using localhost?

    [HttpGet]
    [Autorize]
    public ActionResult ManagePaymentRun()
    {
            ViewData["currentAction"] = "Index";
            payments.AccountNo = Request.Cookies["FSCSPayments"]["AccountNo"];
            payments.SortCode = Request.Cookies["FSCSPayments"]["SortCode"];
            payments.FirstChequeNo = "2";// Request.Cookies["FSCSPayments"]["FirstChequeNo"]; 
            payments.FileName = Request.Cookies["FSCSPayments"]["FileName"];
            payments.FRN = Request.Cookies["FSCSPayments"]["FRN"];
            payments.JobNumber = Request.Cookies["FSCSPayments"]["JobNumber"];
            payments.StartRecNo = Request.Cookies["FSCSPayments"]["StartRecNo"]; 
            return View(payments);
    }

    internal void CreateCookie()
    {

        HttpCookie cookie = new HttpCookie("FSCSPayments");
        cookie.Values.Add("AccountNo", payments.AccountNo);
        cookie.Values.Add("SortCode", payments.SortCode);
        cookie.Values.Add("FirstChequeNo", payments.FirstChequeNo);
        cookie.Values.Add("FileName", payments.FileName);
        cookie.Values.Add("FRN", payments.FRN);
        cookie.Values.Add("JobNumber", payments.JobNumber);
        cookie.Values.Add("StartRecNo", payments.StartRecNo);
        cookie.Expires = DateTime.Now.AddDays(14);
        cookie.Path = "/";
        Request.Cookies.Add(cookie);
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T10:59:25+00:00Added an answer on May 18, 2026 at 10:59 am

    This problem is solved and was due to the fact that i used IIS 5 and MVC. we copied this project over to a IIS7 pc now and we got the cookies working.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having a problem with cookies. If the browser has cookies disabled, the cookie
Having a problem getting a TreeView control to display node images. The code below
I am having a problem where a cookie I am setting is being lost
I am having a problem deleting a cookie on my test server. On my
I'm having a problem setting a cookie and doing a 302 redirect In chrome
I'm having this problem with my dotnetnuke website where the .DOTNETNUKE cookie is being
I am having problem in java to pass cookie from client to server. In
I'm having trouble figuring out how to access a cookie from a compiled object.
Having programmed through emacs and vi for years and years at this point, I
I am having a strange problem with Internet Explorer not accepting my cookies. This

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.