I have a base web ui project, I also have other 'plugin' projects which are just other mvc web applications.
I take the dll's and views from them and toss them into my main web ui's bin and views folder so they can just be added or removed at any time which does work.
each 'plugin' contains a GET method that is called from the main web ui to load the menu options from each of the 'plugins'.
After each URL is called, the main web ui fires the `Session_Start'
menu.Append(HelperMethods.GetModuleMenuHTML(controller, SecurityController.CurrentDomain()));
public static string GetModuleMenuHTML(string controllerName, string currentDomain)
{
string html = string.Empty;
try
{
//THIS LINE HERE IS CAUSING Session_Start to fire again
//IN THE MAIN WEB UI
html = new WebClient().DownloadString(string.Format("{0}/{1}/GetMenu", currentDomain, controllerName));
}
catch (Exception ex)
{
}
return html;
}
What is causing Session_Start to fire when calling html = new WebClient().DownloadString(string.Format("{0}/{1}/GetMenu", currentDomain, controllerName));
and how can I prevent that from happening?
Does this have something to do with me just dropping in the dll and views from another project directly into the main web ui projects as a "plugin" (which does however load correctly into my UI) to be easily added and removed?