Loading Modular ASP.NET Components at Runtime

samraven

New Member
I'm building an ASP.NET website that will act as a "framework" and display information about some services that are running on the web server. One of the things that the site needs to do is serve up custom configuration pages for some modules that have been loaded by the service. The modules will all implement a common API, so there is no concern there -- my concern is how can I get configuration pages, which are unique to each module, served up by a common front end? The pages need to validate user input, handle button clicks, etc. So it's not as simple as having a method on each module:\[code\]public string getHTMLConfigPage()\[/code\]That would only work if the module's config page didn't require user input. In this case, all of the modules will require some form of configuration, at the very least a checkbox indicating "turn on/off"Here's the ideal use case:[*]At run time the IIS process talks to the back end service and figures out there are N modules running[*]The server adds links for these N # modules to a drop down menu[*]When the user clicks the menu item for a module, the module's configuration page is displayed[*]The user configures the module however they wish, with the individual module controlling that entire sequenceWe've already implemented this successfully in C# winforms. The way we did it there was to have each module implement a method \[code\]public void showConfigDialog(IWin32Window parent);\[/code\]. That works well for a regular desktop app -- but obviously doesn't help me do anything with the web server.The only thing that I have thought of so far is to have each module also install some stuff onto the IIS web server, and then just do an \[code\]iFrame\[/code\] where the main "framework" page can display the module's page in the frame (or a popup window), but that seems messy in that the module developer has to then include some kind of setup scripts to put stuff into the IIS space... So - is there a better way to do this, or is the iFrame method the only way?Systen Details:
  • ASP.NET 4.0
  • C# .NET 4.0
  • IIS 7.5 (Server 2008 R2)
 
Back
Top