MathKernel graphics call fails in ASP web service
- To: mathgroup at smc.vnet.net
- Subject: [mg78514] MathKernel graphics call fails in ASP web service
- From: Joe Eddy <jceddy at gmail.com>
- Date: Tue, 3 Jul 2007 05:35:55 -0400 (EDT)
Alright, this is a pretty simple thing that doesn't seem to be working, I have a web service with the following (very simple) example web method: [WebMethod] public void SimpleTest() { MathKernel kernel = new MathKernel(); kernel.AutoCloseLink = true; kernel.CaptureGraphics = true; kernel.CaptureMessages = true; kernel.CapturePrint = true; kernel.GraphicsFormat = "Automatic"; kernel.GraphicsHeight = 480; kernel.GraphicsResolution = 0; kernel.GraphicsWidth = 640; kernel.HandleEvents = true; kernel.Input = null; kernel.Link = null; kernel.LinkArguments = null; kernel.PageWidth = 60; kernel.ResultFormat = MathKernel.ResultFormatType.OutputForm; kernel.UseFrontEnd = true; kernel.Compute("Plot[x,{x,0,1}]"); } When I call the method, I get this error: Mathematica.exe - Application Error The instructions at "0x004033fb" referenced memory at "0x0000000c". The memory could not be "read". It works fine if the string I feed to Compute() doesn't generate graphics output, or if I put that function in, say, a Windows Application it works fine. I have been trying different arrangements of settings to the MathKernel object, but so far haven't had any luck. Any ideas? I'm running .NET Framework version 1.1.