Click here to Skip to main content
15,867,594 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Hi all,

I am wondering to use the Roslyn compiler as online web page using ASP.Net
I have already download NuGet package and use Roslyn from there to access its API's.
However, I want to build a web page that allow users to execute any code from there.

How could I make it available??

Any suggestion related to that.


Thanx in advance.
Posted
Comments
Sergey Alexandrovich Kryukov 17-Mar-14 11:38am    
I wonder, why? Theoretically, this is possible, of course, but you would need to host it all on you HTTP server host, so you would need to have full control over the host system...
—SA

1 solution

Please see my comment to the question.

I don't clearly understand why would you really need what you need, but I would suggest to think at one alternative: using "regular" VB.NET and C# compilers available on your host system. They are available simply because you are using ASP.NET, which, in turn, requires installation of .NET on the host computer (well, or Mono). In all cases, at least those two compilers are always available, at least because .NET should support CodeDOM. So, they can be used indirectly, via CodeDOM. Please see:
http://msdn.microsoft.com/en-us/library/y2k85ax6%28v=vs.110%29.aspx[^],
http://msdn.microsoft.com/en-us/library/system.codedom%28v=vs.110%29.aspx[^].

—SA
 
Share this answer
 
Comments
Y.Mohammed 17-Mar-14 11:52am    
Thanx Sergey, My idea i to build an online compiler to be part from any system. So, student could access it to compile their. I choose Roslyn as prototype to present that. Therefore, I need to build the function of Roslyn as online compiler.
Sergey Alexandrovich Kryukov 17-Mar-14 13:03pm    
That was my guess. As I explained, you don't have to use Roslyn, because having .NET on server side is enough to use it for this purpose. Two compilers are always available to you. Even if you use CodeDOM to debug in memory, they compile to some temporary files which can be loaded in process memory and executed via reflection. You can also deliver the assembly built to the user via HTTP. I see no reason to have anything else...
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900