private string CreateAppDirectories(Application application) { String dbName = application.db_name; String applicationName = application.Name; String member_public_id = application.Member.public_id; String memberDirectory = Globals.APP_DATA_PATH + "\\" + member_public_id + "\\"; String applicationDirectoryName = applicationName + "_" + application.Id; memberDirectory = DirectoryUtility.CreateDirectory(memberDirectory, applicationDirectoryName); //Copy general application folders string appRoot = Environment.CurrentDirectory; string pth = Globals.APP_DATA_PATH + "\\ApplicationFolders\\"; DirectoryUtility.CopyDirectory(pth, memberDirectory); //Create application directories ApplicationUtilities utilities = new ApplicationUtilities(memberDirectory, application.Name); utilities.CreateMainAppFiles(application); //Copy Theme File from App_Data/Themes string appTheme = application.Theme.FileName; System.IO.File.Copy(Globals.APP_DATA_PATH + "\\" + "Themes\\" + appTheme, memberDirectory + "\\Content\\" + appTheme); return(memberDirectory); }