AspNet4YouTop 10sDevelopers WorldForums
Home
About
ASPNet Books
ASPNet Sites
ASPNet Hosters
View Articles
Search Articles
Authors
View Forums
 
Quick Menus
HOME
About
AspNet4You Forums
Articles
Authors
Search
Articles Summary
Articles(RSSFeed)
AspNet Books
AspNet Sites
AspNet Hosters
 Top 10 ASP.NET Books 
Professional ASP.NET 1.1
Essential ASP.NET With Examples in C#
ASP.NET Unleashed
Programming Data Driven Web Applications with ASP.NET
Professional ASP.NET Web Services
Beginning ASP.NET 1.1 with Visual C# .NET 2003
Programming Microsoft ASP.NET
Beginning ASP.NET Databases Using VB.NET
ASP.NET Security
Developing Microsoft ASP.NET Server Controls and Components
More...
 Top 10 ASP.NET Hosters 
WebHost4Life
DiscountASP.NET
MaximumASP
Brinkster
ORCS Web
myhosting.com
ISQSolutions
ASPwebhosting.com, LLC
Active ISP
Aquest Hosting
More...
 Top 10 ASP.NET Sites 
Asp.Net
GotDotNet
4GuysFromRolla.com
123aspx.com
EggHeadCafe.com
CShrp.Net
.NET 247
DevelopersDex.com
Csharp-Corner.com
dotnetspider
More...
Search Articles
Google
ASPNET4YOU      
Category:   Search Type:   Match Type:  
ASP.NET 2.0 - Safely Compile And Execute Source Code Dynamically.
Author: Morris, RobbePosted: 2/25/2006 2:50:21 PM
You've probably run across all sorts of code samples for dynamically compiling and running source code in .NET 2.0. Fortunately, this is fairly easy in .NET. What I haven't yet seen covered is a safe way to do this in an ASP.NET environment. The biggest problem you run into is that each time you compile your code (even if you use the exact same attributes and settings) is that a new duplicate assembly is loaded into memory. So, you could easily wind up with thousands and thousands of duplicate assemblies floating around in memory on your server because there is no facility in .NET 2.0 to unload an assembly from memory.

I am currently working on an application that permits the creation and implementation of business rules at runtime to perform such tasks as data processing, validation, navigation, and calculation rules. In fact, we support user specific compiled rules in some rare instances. The requirements are far too complex to attempt to make these rules entirely database driven. In the end, actual C# compiled code is required.
Read this article from external site
Terms and Conditions