I am trying to programmatically modify a ECT/Entity based on REST data from another system. It works if I am running it from a console application but if I am trying to run it from for example a finder method it gives me the following exception:

The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again.

Any suggestions what I can do to make it run?

I tried to elevate the privileges but even this did not change anything. The BCS is running with the account of the farm administrator and even if this user starts the console application Version of my script it modifies the model perfectly.

I am a bit clueless why I do not have the right permissions to modify anything from the model.

  • By elevating the priviliges, the code will be executed by the App Pool account, so if your farm account has permissions but not your App Pool account, that could very well be the issue! – Robert Lindgren Nov 15 '13 at 15:20
  • Hmm I was already thinking about the same but the the App Pool Account is the same as the Farm Account. As I said if I am running the same solution as a console application under any account which has rights to modify the BDC Model set in the Business Connectivity Settings it works but not if I am running it in context of for example a findermethod. :( – Husen Nov 18 '13 at 7:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.