hi,
I get "A security error occurred" error when I try to run a Pre-translate task programatically via the Studio API, using the ETS plugin as translation provider.
I add the cretentials for the provider (ets://server:8001) in this format: "user=xxxx;password=yyyy", then run the pre-translate task like this:
sdlProject.RunAutomaticTasks(projectFiles.ToArray(), taskTemplateIds);
If I run a request like this from the same console application, it works properly:
using (HttpClient httpClient = new HttpClient())
{
var uri = new Uri("https://server:8001/api/v2/auth?username=xxxx&password=yyyy");
HttpResponseMessage result = httpClient.PostAsync(uri, (HttpContent)null).Result;
}
But the same request with exactly the same uri fails inside ETSTranslatorHelper.GetAuthToken(), when I start the pretranslation task programatically.
When using the plugin from Studio itself, it works properly. The authentication request above also succeeds (I put a breakpoint there).
Do you have an idea what setting may be missing, or what do I wrong?
Thanks,
Tamas