I have just turned my mvc3 project into a mvc4 project. I made a new project, did not modify any config files, moved my controllers, views and models. I then imported mysql to the project.
Everything works fine but I got a problem with the whole authorization process.
If I add that in my view:
@if (User.Identity.IsAuthenticated)
{
// Something
}
else
{
// Another Thing
}
It will always trigger something. It will think that I am authenticated even if I am not (I have checked my cookies and I have none).
And of course I can reach all of my controllers which should be protected with [Authorize].
Any idea how to fix this issue?
Thank you very much for your help.
I have fixed my problem.
The problem comes from the fact that I created an empty project. It seems that no configuration at all has been made.
You have to make a default project in order to have the correct setup.