The CodeDom will allow you to compile the code into an assembly, that assembly should contain the webmethods. What you will need to generate is the asmx or svc file associated with the service, this could be done via a template. The posters approach could work, but it could generate a lot of problems without an accurate code checker on the server. The codedom can generate the necessary code files and those could be stored in the DB to be assembled at any time possibly. I have never used the codedom but I know it has these capabilities. As for System.Web.Host, I have no idea about this as I have never used it.