How to compile C # code at runtime in an ASP.NET MVC5 project?

1

I tried to use CodeDom , but when I try to search for a specific DLL to execute my code, the Assembly.GetEntryAssembly().Location command always returns me null .

It seems that ASP.NET projects are executed and managed by IIS ( obviously ) and use a temporary directory.

I would like a solution so that in my web application the user would type the code C# and then that code would be sent to the server, compiled and executed to return a response to the user.

In projects Windows or Console , everything works perfectly, but in a DDD solution with Start Up Project as an application ASP.NET MVC5 this does not work.

    
asked by anonymous 30.10.2017 / 14:44

0 answers