Quantcast
Channel: SCN : Discussion List - SAP Crystal Reports, version for Visual Studio
Viewing all articles
Browse latest Browse all 3636

App crashes with System.AccessViolationException when using .Net application client on windows 2012 with target .NET framework 4.5

$
0
0

I have following environments /configuration

 

  • SAP Crystal server 2013 installed on windows server 2012.

 

I have a simple .Net application which is using .NET sdk for crystal server (14.0.3500.0) with following config

 

  • Application is running on another windows server 2012
  • Target framework is 4.5
  • Code
  internal SessionMgr sessionMgr = new SessionMgr();          internal EnterpriseSession enterpriseSession = null;          internal EnterpriseService tempService = null;          internal ReportAppFactory reportAppFactory = null;           enterpriseSession = sessionMgr.Logon(_CMSUSER, password, reportServerName, "secEnterprise");            tempService = enterpriseSession.GetService("", "RASReportFactory");            reportAppFactory = (ReportAppFactory)tempService.Interface;           enterpriseService=  enterpriseSession.GetService("InfoStore");           EnterpriseService enterpriseService;                InfoStore infoStore;                InfoObjects infoObjects;                enterpriseService =  enterpriseSession.GetService("InfoStore");                infoStore = new InfoStore(enterpriseService);                infoObjects = infoStore.Query("Select SI_ID From CI_INFOOBJECTS Where SI_NAME='" + reportName + "' And SI_INSTANCE=0");                //DebugManager.LogDebug(session, "Before report.Open " + oReportFileName);                InfoObject infoObject = infoObjects[1];                Console.WriteLine(infoObject.ID.ToString());        report = sessionObject.reportAppFactory.OpenDocument(infoObject.ID, 0);

 

I'm getting An unhandled exception of type 'System.AccessViolationException' occurred at line 18.  This works fine when i run .net application on windows 2008 R2.

 

 

.NET Call Stack



Function
DomainBoundILStubClass.IL_STUB_CLRtoCOM(System.Object, Int32)+198
[[InlinedCallFrame] (CrystalDecisions.ReportAppServer.ClientDoc.ISReportAppFactory.OpenDocument)] CrystalDecisions.ReportAppServer.ClientDoc.ISReportAppFactory.OpenDocument(System.Object, Int32)
TestCrystalServer.Program.TestCrystalServer()+2e7
TestCrystalServer.Program.Main(System.String[])+24
[[GCFrame]]

 

Full Call Stack

 

Function
ATL80!AtlComPtrAssign+1e
sacorbaadapter+954b
sacorbaadapter+9a95
sacommlayer!DllGetClassObject+2900
clientdoc!DllGetClassObject+4b765
clientdoc!DllGetClassObject+1129e
clientdoc!DllGetClassObject+1163c
clientdoc!DllGetClassObject+3ae32
clientdoc!DllGetClassObject+3aefe
clientdoc!DllGetClassObject+395cf
clientdoc!DllGetClassObject+9c57
DomainBoundILStubClass.IL_STUB_CLRtoCOM(System.Object, Int32)+198
[[InlinedCallFrame] (CrystalDecisions.ReportAppServer.ClientDoc.ISReportAppFactory.OpenDocument)] CrystalDecisions.ReportAppServer.ClientDoc.ISReportAppFactory.OpenDocument(System.Object, Int32)
TestCrystalServer.Program.TestCrystalServer()+2e7
TestCrystalServer.Program.Main(System.String[])+24
clr!CallDescrWorkerInternal+83
clr!CallDescrWorkerWithHandler+4a
clr!MethodDescCallSite::CallTargetWorker+2e6
clr!RunMain+1e7
[[GCFrame]]
clr!Assembly::ExecuteMainMethod+b6
clr!SystemDomain::ExecuteMainMethod+45e
clr!ExecuteEXE+3f
clr!CorExeMainInternal+ae
clr!CorExeMain+14
mscoreei!CorExeMain+e0
mscoree!CorExeMain_Exported+57
kernel32!BaseThreadInitThunk+1a
ntdll!RtlUserThreadStart+1d

Viewing all articles
Browse latest Browse all 3636

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>