This project is read-only.

RDotNet ParseException on IIS

Jan 12, 2013 at 6:45 AM
Edited Jan 12, 2013 at 6:46 AM

 var envPath = Environment.GetEnvironmentVariable("PATH");

 var rBinPath = @"C:\Program Files\R\R-2.15.2\bin\i386"

;

 Environment.SetEnvironmentVariable("PATH", envPath + Path

.PathSeparator + rBinPath);

 using (var engine = REngine.CreateInstance("RDotNet"

))

{

   engine.Initialize();

  var v = engine.Evaluate("decompose(ts(c(17,26,53,96), 0, 4, frequency = 2))$trend").AsVector();

}



=> ParseException on last line.

The error occurs in the IIS, in the pool rares run x86 applications.
If this run on asp.net web server all works.

How fix it ?

Aug 17, 2013 at 2:00 PM
have you solved the problem?
i got the same one
Aug 19, 2013 at 7:53 AM
Usually such problem occurs when the R.net is not initialized properly.

Create a console program and apply this code, it would give more explicit error information, which is useful to solve the problem. So could you please tell me the error information in console program?
Aug 19, 2013 at 2:36 PM
10d_world wrote:
Usually such problem occurs when the R.net is not initialized properly.

Create a console program and apply this code, it would give more explicit error information, which is useful to solve the problem. So could you please tell me the error information in console program?
finally, i solved the problem by using wcf hosted by a console application...
it is weird that it runs well only when i am using console application on the server, even wcf hosted by iis goes wrong.
it runs well on iis in my pc...