SAP.NET 2.0 异常

SAP和外围系统(.NET)的交换一直是一件头痛的事情,目前比较灵活的也就是RFC了,但是还是怪异的异常频发。。。。

异常1:调用端没有安装SAP客户端组件,主要是system32下缺少了一个librfc32.dll文件

异常2:
The CLR has been unable to transition from COM context 0x211618 to COM context 0x211788 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations.

超时,RFC太复杂,或是数据量太多都会造成超时,这个还算比较好处理

异常3:
System exception thrown while marshaling RFCTYPE_BCD to .NET type.

如果RFC中用TIMS类型或DATS类型一定要小心,SAPLogin 710和Framework 好像兼容性不好很容易报错,但是用640的librfc32.dll(大概7M左右)不会出错。

posted on 2009-08-07 09:51  LongSky  阅读(1192)  评论(2编辑  收藏  举报

导航