When you load a dynamic assembly, by default it loads it into the same AppDomain that you're running in, with Roslyn or not.
However there are some considerations:
- You do not need the Roslyn service (which is used by Script Engine), you only need the Roslyn client DLLs if you're just going to build and run the code.
- You don't really need Roslyn to compile dynamic code and run it. .NET already has the ability to load, compile and run an arbitrary lump of code. This article is a little old but still valid. Use reflection in your page to load and run the dynamic DLL.
- If it is the Roslyn script engine you need, that needs the Roslyn service (to act as a host). The service needs visual studio 2012. As Daniel Mann points out in the comment, that's not licensed for production.
- Memory leaks via IIS are often caused by a given thread/request, not by actions on the App Domain (or shared resources). Your dynamic code (be it Roslyn Script Engine or plain old dynamic assembly) will be running outside where the leaks are happening, so I doubt you will see any problems.
- This scares me. Running dynamic code straight onto live sounds amazingly dangerous. Protect yourself!
Can you reproduce it locally or on a test machine similar to live? If it only happens over an extended period of time, then you can simulate use using automation like Selenium.
Once you have it reproduced, use something like ANTS Memory Profiler to see where the problems are.