Error anti-forgery cookie "__Requestverificationtoken" is not present happens only in Internet Explorer

Asked

Viewed 279 times

3

I have a problem I have no idea how to fix.
I have an Asp.net mvc app posted on my machine, where I can use all the features (create, Edit, delete) perfectly, whether in Chrome or IE.
It turns out that when publishing to the homologation server, I can’t run the features in IE, only in Chrome. In the IE, any of these functions presents an error in the Antiforgerytoken:

The required anti-forgery cookie "__Requestverificationtoken" is not present.

The only approved customer browser is Internet Explorer, so changing is not an option.

I am using the helper as indicated and in the same standard of existing applications on the server.

Controller:

[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Create(GrupoCanaisViewModel grupoCanaisViewModel)   
{
     .
     .
     .
}

View:

@model DCX.ITLC.SGPCAPABILIDADE.Application.ViewModel.GrupoCanaisViewModel

@{
    ViewBag.Title = Resource.CadastroDeGrupoDeCanais;
}

<h2>@ViewBag.Title</h2>
<hr />

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    <form id="FormCreateGrupo">
        <div class="form-group">
            <div class="form-horizontal">
                @Html.ValidationSummary(true, "", new { @class = "text-danger" })
                .
                .
                .         
            </div>
        </div>
    </form>
}

I have compared the IIS configurations of the homologation with those of my machine and there is nothing different, I have also recreated the application on the server and nothing changes.

I need a north.

  • give a look at this link has helped me with this problem... https://stackoverflow.com/questions/8604336/asp-net-mvc-3-web-site-anti-forgery-token-fails-only-on-ie

  • 1

    In the view and controller seems to be correct, do you use SSL in the application? Is there this on your web.config <httpCookies requireSSL="true" />? If there is comment on the line to see if it works.

  • most likely the customer is with disabled cookies, take a look at internet options > privacy

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.