1

I am working on an ASP.NET MVC 4 application.

I need to use the session for storing various things. My mandate is to not use cookies.

Is there a way I can work through this? I have been told that ASP.NET MVC 4 will not work in cookie-less mode.

Is there any other alternative way?

2
  • 1
    MVC 4 will most certainly work without cookies. So long as you don't use them. And Session support hasn't changed at all in MVC 4. Commented Mar 2, 2013 at 15:54
  • 1
    I was under the impression MVC does not support cookieless sessions? If you create a test project with cookieless sessions enable in the web.config everything seems to work okay. But then try and create a simple ActionLink and it goes horribly wrong. Commented Feb 7, 2014 at 20:22

1 Answer 1

0

Edit your web.config

<sessionState cookieless="true" timeout="20" />
Sign up to request clarification or add additional context in comments.

4 Comments

There is also a line in the FormsAuthenticationService, in the SignIn() method that writes to a cookie. How do we deal with that?
Its related to the original question, your accepted answer above does not address both issues for cookieless mvc apps, your answer is only a partial answer.
I understand, I will ask another question. But do know that if his mandate was to be truly cookieless, this answer doesn't address the "other" cookie that gets created upon login.
"My mandate is to not use cookies.", I assumed that meant ALL cookies, my apologies if that was presumptuous of me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.