I'm trying to make a custom webservice using C# and Visual Studio .NET and a reference to the ComAPI. I am getting the following exception when I hit the Init method of the session object:
System.Runtime.InteropServices.COMException: 1.2750.6
The basic code is below:
If I paste this same code in a C# Windows project (in a form), I do not get this error, the session opens without a problem.
Any suggestions how this code should be modified in a Web Service project?
My environment is:
Advantage Series Enterprise (Version 5.3A Service Pack 3)
Pervasive Database
I should probably mention that I am trying to call this code in the Application_Start event Global.asax.cs file.
System.Runtime.InteropServices.COMException: 1.2750.6
The basic code is below:
Code:
AccpacCOMAPI.AccpacSession accpacSession = new AccpacCOMAPI.AccpacSession();
// DEBUG - the following line gives me the exception:
// System.Runtime.InteropServices.COMException: 1.2750.6
accpacSession.Init("","AS","AS9031","53A");
accpacSession.Open("ADMIN", "ADMIN", "SAMLTD", DateTime.Today, 0, "");
If I paste this same code in a C# Windows project (in a form), I do not get this error, the session opens without a problem.
Any suggestions how this code should be modified in a Web Service project?
My environment is:
Advantage Series Enterprise (Version 5.3A Service Pack 3)
Pervasive Database
I should probably mention that I am trying to call this code in the Application_Start event Global.asax.cs file.