I was working on getting a breakpoint up and running in a test module and somehow broke my site. Not sure if this is the correct category to ask this in?
When I was testing my site when I ran the site in debug mode I received this error and now can't get my site load. Are there methods I can try to get my site back up and running or recover from this error?
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.MissingMethodException: Method not found: 'Void DotNetNuke.Common.Globals.set_DependencyProvider(System.IServiceProvider)'. Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[MissingMethodException: Method not found: 'Void DotNetNuke.Common.Globals.set_DependencyProvider(System.IServiceProvider)'.] DotNetNuke.Web.Common.Internal.DotNetNukeHttpApplication.Application_Start(Object sender, EventArgs eventArgs) +0 [HttpException (0x80004005): Method not found: 'Void DotNetNuke.Common.Globals.set_DependencyProvider(System.IServiceProvider)'.] System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +546 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +171 System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +173 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +255 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +347 [HttpException (0x80004005): Method not found: 'Void DotNetNuke.Common.Globals.set_DependencyProvider(System.IServiceProvider)'.] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +552 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +122 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +737
Did the module you were working on have a dnn file with it?
Maybe check the it for : <dependencies> <dependency type="CoreVersion">09.07.02 or what ever version you are running</dependency> </dependencies>
Chris's module template are set to use : dnn version 9.8 - it messed me up when I started using his templates. There are several other old problems from way back also - I just happened to remember them.
Posted By Brian Dukes on 27 Sep 2021 01:46 PM If there's a method missing exception, something in your site was built against a newer version of an assembly than what's in the bin folder. Maybe your test module included some DNN DLLs in the bin folder that were an older version?
This could be the case. I develop my modules outside the DNN DesktopModules folder. So I always place a bin folder next to my modules folder and add references when missing to this bin folder. For example C:\repos\modules\Webforms\moduleSolutionFolder I would have a bin file C:\repos\modules\Webforms\bin
If I have a missing reference I'll drop a .dll into this bin folder. So I could have somehow picked up an older DNN dll file.
Posted By John A on 28 Sep 2021 03:08 PM Did the module you were working on have a dnn file with it? Maybe check the it for : <dependencies> <dependency type="CoreVersion">09.07.02 or what ever version you are running</dependency> </dependencies>
Posted By John A on 28 Sep 2021 03:08 PM Did the module you were working on have a dnn file with it?
Maybe check the it for :
<dependencies> <dependency type="CoreVersion">09.07.02 or what ever version you are running</dependency> </dependencies>
See above for where my bin folder is and I drop a .dll in when needing a reference, or one is missing when working with a solution file.
I'm showing in the module
<dependencies> <dependency type="CoreVersion">09.08.00</dependency> </dependencies>
I have DNN 9.8.1 installed right now.
Is there a way to get the site back up from an error like this? Or, do I have to scrap my local dnn install and start with a new install? Then hunt down my old DLL file that is causing this issue in my modules bin folder mentioned above?
Thanks!
I'm going to try and copy of the current install dlls. I'm sure I tried using the current ones, but I guess I missed one.
Then mark any DNN assemblies you're referencing as Copy Local=False so it doesn't happen again.
How do I go about doing this, to mark Local=False?
In Visual Studio, open References in the project explorer, highlight the references, then go to the Properties pane (F4 is the default shortcut), find Copy Local and select False from the dropdown. Somewhat unintuitively, this will add <Private>False</Private> to reference specification in the project file.
<Private>False</Private>
Trying the above out. I'm also copying the DotNetNuke.dll from my site bin to my modules bin. Comparing the two they seem to be the same version. But, just trying to cover all possibilities.
These Forums are dedicated to the discussion of DNN Platform.
For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:
Awesome! Simply post in the forums using the link below and we'll get you started.