Привет, форум все же больше навиженовский.
Подобные вопросы принято задавать на axforum.info
Ваша проблема, скорее всего связана с областью действия assert.
https://msdn.microsoft.com/en-us/library/bb190039.aspx
Цитата:
Declare a variable for the relevant permission class.
Create a new instance of the class.
Request permission by using the assert method on the permission class.
Revert the assertion (to limit the scope of the permission) after the CAS-enabled API has been used; optional. Permission is automatically reverted when the method finishes executing.
исходя из кода джоб валится на 15-й строке [while (!record.EOF())] внутри метода класса все отработало на ура. К этому моменту разрешение на ComInterop уже снято.. оно вообще в в области джоба не разрешено