Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import from Remote Client Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException: The required antiforgery cookie "..." is not present #3989

Closed
PiemP opened this issue Jul 31, 2019 · 3 comments
Milestone

Comments

@PiemP
Copy link
Contributor

PiemP commented Jul 31, 2019

Sorry guys for this question but I can't come out from this problem. I'm try to use Import/Export of Orchard Core to move some data from my old platform to an Orchard Core installation but when I try to post my data I found this message on Orchard log:
Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException: The required antiforgery cookie "..." is not present
I've looked at the code in the ImportRemoteInstanceController and I've seen that the method Import have [IgnoreAntiforgeryToken]. Why it ask me about antiforgery cookie?

I'm on .NET Core 2.2 and I've added Orchard Core to my project by Nuget package version 1.0.0-beta3-71077.

Thank you.

@sebastienros
Copy link
Member

@deanmarcussen could it be due to the AFT filter order change?

@sebastienros sebastienros added this to the rc milestone Aug 1, 2019
@deanmarcussen
Copy link
Member

@sebastienros I can't repro, but maybe there is still some thinking to do about that choice of 1000, I will make some further notes on #3993

For this issue, @PiemP I think you are using the beta3 from NuGet. The AntiforgeryValidationExpection is an issue that was fixed in #3622 which is in the MyGet dev packages. However it was an error in the logs that did not cause an issue, but I think happened when you setup a development site on a machine that previously had another site setup on it. For more details see #3293

Is your import / export actually succeeding? You should see an error visible in the admin if the post to a remote instance does not succeed.

I tried this morning and was able to successfully setup a remote instance and import data from a remote client with no errors, and could see a new content item appear on the remote instance.

Could you provide some more details about what is not working?

@PiemP
Copy link
Contributor Author

PiemP commented Aug 2, 2019

Thank you guys....

🙇 sorry sorry sorry...It's my fault. I've made a PUT request not a POST request and Orchard correctly give me an error. 🙇

Now my application work correctly.

@PiemP PiemP closed this as completed Aug 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants