1

Resolved

No conversions

description

Hi, I deployed the solution using source code [uploaded Dec 14 2011]. Everything appears as per the documentation but no conversions are occurring. I am leaving Library Name blank to use current location. I've tried various formats. WAS is running and the timer job is completing every 15 minutes. I have checked the logs and everything looks good.
 
Any ideas? I was really dying to see this action. Thanks so much for the sample code. It seems amazingly concise considering the level of customisation. Great stuff.

file attachments

comments

RajanGarg wrote Jan 31, 2012 at 8:08 AM

PDF conversion works but it takes longer for initial conversions. Make sure input must be generated from correct source and of valid type.

panoone wrote Feb 12, 2012 at 11:49 PM

Hi Rajan, the source was a docx file. Nothing special about it. I'm unable to convert it to ANY format.

There are no errors thrown and the timer job completes successfully. Any ideas how to debug or what is occurring? I'd really love to get this working.

RajanGarg wrote Feb 14, 2012 at 3:55 PM

Hi Panoone,

Which version of source code are you using? I have fixed few bugs in earlier version.
New source code uploaded on Jan 31.

If you got development environment, is it possible for you to debug the code step by step?

panoone wrote Feb 16, 2012 at 2:21 AM

I have downloaded the latest source and the only difference I found was the using statement an line 21 in ConvertDocument.aspx.cs. Was this the only change?

I have rebuilt and deployed the solution again but am still seeing no conversions. :(

Could I be missing some configuration with the Word Automation Service? The service name is correct, the service is running and all configuration settings are default.

panoone wrote Feb 16, 2012 at 2:30 AM

If it's any help I can tell you that I am not seeing the success message when the dialog closes. The placeholder (and AdditionalPageHead delegate) are both present in the masterpage.

private void CloseDialogOnSuccess()
    {
        ContentPlaceHolder pageHead = this.Master.FindControl("PlaceHolderAdditionalPageHead") as ContentPlaceHolder;
        if (pageHead != null)
            pageHead.Controls.Add(new LiteralControl("<script language='javascript'>ExecuteOrDelayUntilScriptLoaded(closeDialog,'sp.js');function closeDialog(){SP.UI.ModalDialog.commonModalDialogClose(SP.UI.DialogResult.OK, 'Selected documents conversion completed.');}</script>"));
    }

RajanGarg wrote Feb 16, 2012 at 5:17 AM

Hey Panoone,
Yes, in latest release i made changes in element file to issue to make application work for sites under managed path. Earlier it was only working for root site.

Can you first try to convert document via PowerShell to verify everything fine at Word Automation Side? Below is the PowerShell script. Before run just modify variables (start with Var as per your environment:

[void][System.Reflection.Assembly]::LoadWithPartialName( "Microsoft.Office.Word.Server" )

$jobSettings = New-Object Microsoft.Office.Word.Server.Conversions.ConversionJobSettings

$jobSettings.OutputFormat = "PDF"

$job = New-Object Microsoft.Office.Word.Server.Conversions.ConversionJob( "Var Word Automation Service", $jobSettings )

$job.UserToken = (Get-SPWeb http://VarSiteName).CurrentUser.UserToken

$job.AddFile( "http://VarSiteName/Document%20Library/VarDocName.docx", "http://VarSiteName/Document%20Library/VarDocName.pdf" )

$job.Start( )

panoone wrote Feb 19, 2012 at 10:07 PM

Hi Rajan, thanks for the help. I ran the PowerShell. No errors but still no conversion. :\

Can I add some feedback or debugging to this just to confirm that the job is queued and was successful?

RajanGarg wrote Feb 20, 2012 at 2:16 PM

Hi Panoone,

To me problem looks with the SharePoint Word Automation Service configuration in your environment. Do you have any other environment or VM where you can test this app?

Can you check this URL to troubleshooting: http://technet.microsoft.com/en-us/library/ff808318.aspx

This troubleshooting may be boring but we will fix it with patience.

Let me know if you face any difficulties.

panoone wrote Feb 27, 2012 at 2:38 AM

Hi Rajan, I have gone through all the troubleshooting steps and can't find anything wrong. :(

Is there any kind of error-checking or debugging steps I can perform via PShell or VS code, just to check where it's failing? Can I query the conversion queue after I add an item?

RajanGarg wrote Feb 28, 2012 at 7:29 AM

Hi Panoone,
Surely you can check the Word Automation Job database to see job is created or not.
I would like to suggest you to do following steps:
  1. create a new Word Automation Service (with new database).
  2. Associate this service with SharePoint collection.
  3. Run the job via PowerShell. Make sure to provide new Word Automation Service name. Also you must have enough permissions to run this job.
  4. Once job is executed. Goto Word Automation Database created above and check Items table.
  5. Locate entry for your job and check ErrorCode column for any errors.
    Let me know whats the output.

wrote Feb 29, 2012 at 1:13 AM

panoone wrote Feb 29, 2012 at 1:13 AM

Hi Rajan, I'm not SQL admin so that was a last resort.

I've provided a screenshot of the items table which shows error IDs against each test conversion.

RajanGarg wrote Feb 29, 2012 at 6:54 AM

Hi Panoone,

Thanks for database screenshot. It says that we are getting error code 6 means Word Automation Service not able to download the file from input library due to technical problem.
Check list of error codes in this link: http://msdn.microsoft.com/en-us/library/ff512774.aspx
Now search for event ID 1001 in this link http://technet.microsoft.com/en-us/library/ff808318.aspx contains complete description why you are getting this issue.

Please follow the steps as mentioned in second link for event ID 1001 and let me know the details.

RajanGarg wrote Feb 29, 2012 at 7:04 AM

Hi Panoone,

Before you start troubleshooting with my earlier comment. I would like you to check following things:
  1. Under which application pool account the Word Automation Service is running.
  2. Under which application pool account the Web Application contains document library running.
    If both are not same or application pool account running Word automation service doesn't have permission to access web application (as in your case its not able to download the input file). Try giving Word automation application app pool permissions to web application.
To get details under which Word Automation App pool is running, follow below steps:
If you are not sure which account is running Word automation then I would suggest to go to:
Central Admin –> Application Management –> Manage Service Applications
Manage Service Applications –> Select Word Automation Services and click Properties in the Ribbon
Write down the Application pool
Browse to Security –> Configure Service Accounts
Select from the drop down the Service Application pool you have written down previously
Write down the Account that shows beneath the drop down
Now grant access to this process identity using below command
$w = Get-SPWebApplication –Identity http://yourwebapplicationurl $w.GrantAccessToProcessIdentity("domain\yourapppoolaccountrunnigWordAutomation")

panoone wrote Mar 6, 2012 at 9:05 PM

Hi Rajan,

Firstly, I investigated Event ID 1001 but it is under the MsiInstaller source and has no correlation to SQL.

The app pool for Word Automation Services is "SharePoint Web Services Default" with LocalService identity.

I've run the PS command against the service account specified for the service under Security.

I performed another conversion and this time it worked!! Thank you, thank you. :)

Are the GrantAccessToProcessIdentity steps you provided part of the standard configuration? Because I cannot find any reference to this. In any case, I'm adding it to my build doc! :D

panoone wrote Mar 6, 2012 at 9:12 PM

Also, I never see the 'Selected documents conversion completed' message prior to the dialog closing. Should I?

RajanGarg wrote Mar 7, 2012 at 1:32 PM

Hi Panoone,

Congrats!!!
Finally our troubleshooting works perfectly.

GrantAccessToProcessIdentity is part standard configuration. Actually, when we create a Word Automation service its our responsibility to provide AppPool account with sufficient permissions. For development environment we usually use one account for all applications. So, we don't run to any permissions issue. But when we move to production environment we have to take care of all these things.

Regarding your last question, I am using SharePoint notifications to notify the status whether user has selected job or canceled it. It is an extra feature and not related to Word Automation internal job conversion process.

Would like to hear your feedback and rating on this utility. :)

Cheers
Rajan

panoone wrote Mar 12, 2012 at 12:52 AM

Hi Rajan,

I have provided my rating and feedback. :)

Unfortunately I am not receiving the notifications for success or cancellation (possibly because my admin account has no email address associated with it!).

I would really love to see this implemented as a workflow so that better feedback and tracking of jobs could be provided for normal users.

Thanks for your support!

RajanGarg wrote Mar 12, 2012 at 6:49 AM

Hi Panoone,

For your information, functionality to send email and track progress is not implemented in this solution. If you want frequent document conversion when possible quick solution is to increase the frequency of Word Automation Timer job.

I will add these features too when i get time from my regular work. :)

Cheers,
Rajan

wrote Feb 14, 2013 at 6:49 PM

wrote May 16, 2013 at 8:20 AM

wrote May 16, 2013 at 8:20 AM

wrote Jun 14, 2013 at 7:01 AM