c#中没有ASPPDFLib的MTS对象上下文

时间:2016-05-12 13:40:33

标签: c# asp.net

尝试将页面转换为pdf时,页面返回此YSOD错误:

Obtaining Object Context failed: There is no MTS object context

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Runtime.InteropServices.COMException: Obtaining Object Context failed: There is no MTS object context

我花了很长时间才弄明白,所以希望有一天能帮助别人:)

1 个答案:

答案 0 :(得分:0)

修正了这个问题,包括 AspCompat =“True”在页面顶部和@Page