Hi guys,
I have a new module written in VS2005/C#. I'm not using Web Deployment Projects.
Following this tutorial to the letter (at least, I hope) I wanted to protect the source through precompilation.
http://www.dotnetnuke.com/Default.aspx?TabId=825&EntryID=1140&ssl=0
I used the steps described to "Publish Web Site" in VS2005 with both 'Allow this precompiled site to be updateable' and use 'fixed naming and single page assembilies' checked.
Copied the required DLL's to my module package after compilation and followed the rest of the steps.
Installed the new module successfully in my staging environment, which has the exact same version DNN as the development environemnt - DNN 4.5.3.
When adding the new module to a page, I get a series of exceptions that it cannot find App_global.asax file/assembly. Reading the stack trace, it seems to originate from a single call I make from my primary user controls OnInit event, which loads a specific control:
PortalModuleBase objPortalModuleBase = (PortalModuleBase)(this.LoadControl("mycontrol.ascx"));
DotNetNuke.Services.Exceptions.ModuleLoadException: Unhandled Error Adding Module to ContentPane ---> System.Web.HttpParseException: Could not load file or assembly 'App_global.asax, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. ---> System.Exception: Could not load file or assembly 'App_global.asax, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. --->
When I copy the App_global.asax file and the App_global.asax.compiled file from the precompiled site, I get the message that ASP.global_asax is ambigious (which I kind of expected since global.asax exists referencing DotNetNuke.Common.Global already).
It all works perfectly in my dev environment, it only seems to happen after precompilation of the module.
I'm stumped! What can I do to resolve this? Any ideas highly appreciated as I've been stuck on this for a matter of hours now.
Many thanks,
Matt