I have created A Shiny App And i want to insert the same content of my shinyapp app in my C# Application. If there's any way to do that ?
Asked
Active
Viewed 1,645 times
1
-
use the iframe. – Pork Chop Dec 13 '17 at 12:07
-
This will provide R Code also to be used in C# ? – Mümin Dec 13 '17 at 12:11
-
and with this method ShinyApp will still in the same server not in my own one, I'm Seeking to find any way to apply my R Cod in my C# Wep App – Mümin Dec 13 '17 at 12:13
1 Answers
3
One way of doing it, this is how I set it up for my team, so we can have the best of both worlds is to use an iframe
. If you're using MVC
then something like this should do:
Controller.cs
using System.Web.Mvc;
namespace Dashboard.Controllers
{
public class ShinyController : Controller
{
public ActionResult Index()
{
ViewBag.IFrameSrc = "Address to your shiny app";
return View();
}
}
}
Index.cshtml
<iframe style="border: 0; position:relative; width:100%; height:100%" src="@ViewBag.IFrameSrc"></iframe>

Pork Chop
- 28,528
- 5
- 63
- 77
-
Thanks Pork For this Answer But there's no way to use the code only without making shiny app on the server and then use the link of this app in server ? I mean can i use shinyapp code in R studio in C# code in Visual Studio directly ? – Mümin Dec 13 '17 at 12:28
-
1You can maybe try this https://stackoverflow.com/questions/45605523/can-i-run-a-shiny-app-from-within-r-tools-for-visual-studio – Pork Chop Dec 13 '17 at 12:30
-
-
You could use something like R.NET: https://github.com/rdotnet/rdotnet – StatsStudent Sep 20 '22 at 09:09