3
Answers

Error scheduling Word Automation Services Job

Zeeshan Zaffar

Zeeshan Zaffar

13y
3.1k
1

I have the following lines of code to schecule a Word Automation Services job.


//Convert Word document to PDF


JobSettings.OutputFormat =


job.UserToken =


ConversionJobSettings JobSettings = new ConversionJobSettings();SaveFormat.PDF;ConversionJob job = new ConversionJob("Word Automation Services", JobSettings);SPContext.Current.Web.CurrentUser.UserToken;//job.UserToken = workflowProperties.Web.CurrentUser.UserToken;

job.AddFile(wordFileUrl, wordFileUrl.Replace(".docx", ".pdf"));

job.Start();


When job.start() is execued I get the following error:

 The communication object, Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannelFactory, cannot be used for communication because it is in the Faulted state.

I have checked configuration and permission in Central Admin and everything looks right. Any idea?


Answers (3)