简体   繁体   English

ASP.NET MVC-R IIS部署

[英]Asp.net mvc - R IIS deployment

My app consumes r.net library. 我的应用使用了r.net库。 it works fine in the development pc (as always) when i run it from visual studio. 当我从Visual Studio中运行它时,它在开发PC中正常工作(一如既往)。 Now when I deploy it in the production server under IIS. 现在,当我将其部署到IIS下的生产服务器中时。 It throws 它抛出

Error: Package or namespace load failed for 'RODBC'

in my c# code i have 在我的C#代码中

engine.Evaluate("library(RODBC)")

in the server, in my environment variable for 'Path' I have "C:\\Program Files\\R\\R-3.2.2\\bin\\x64" . 在服务器中,在“路径”的环境变量中,我具有“ C:\\ Program Files \\ R \\ R-3.2.2 \\ bin \\ x64”。 Doesn't help. 无济于事。 I also gave permission (to all) in the library folder- no luck. 我还向所有人授予了图书馆文件夹中的许可-祝您好运。

When I run the r script in R-Studio in the server, it just works fine. 当我在服务器上的R-Studio中运行r脚本时,它运行正常。 But when i run my web app, it doesn't work. 但是,当我运行我的Web应用程序时,它不起作用。

any help??? 任何帮助吗?

this one finally helped me solving it. 这个终于帮助我解决了。

  1. set R_HOME as "C:\\Program Files\\R\\R-3.1.2", 将R_HOME设置为“ C:\\ Program Files \\ R \\ R-3.1.2”,
  2. R_PATH as "C:\\Program Files\\R\\R-3.1.3\\bin\\i386" (or x64, depends on 32bit or 64bit process), add them to system PATH and add bit to system PATH R_PATH作为“ C:\\ Program Files \\ R \\ R-3.1.3 \\ bin \\ i386”(或x64,取决于32bit或64bit进程),将它们添加到系统PATH并将位添加到系统PATH
  3. restart IIS before you try again (iis reset) 在重试之前重新启动IIS(iis重置)

taken from https://rdotnet.codeplex.com/discussions/462947 (the last post) 取自https://rdotnet.codeplex.com/discussions/462947 (最新文章)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM