I try to execute this code in Silcerlight 4 contol hosted in webpart:
clientCtx = new ClientContext(ApplicationContext.Current.Url);
clientCtx.ValidateOnClient = true;
clientCtx.Load(clientCtx.Web);
clientCtx.ExecuteQueryAsync(updateConnectionStatus, Failed);
but it fails and go Failed method and I recive error: "The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again."
When I turn off security validation in central administration everything works. How to avoid this issue?