DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

How to recover site from Server Error in '/' Application.

 7 Replies
 2 Subscribed to this topic
 26 Subscribed to this forum
Sort:
Author
Messages
New Around Here
Posts: 6
New Around Here

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?  

Server Error in '/' Application.


Method not found: 'Void DotNetNuke.Common.Globals.set_DependencyProvider(System.IServiceProvider)'.

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:

 

<code>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.</code>


Stack Trace:
 

<code>&#91;MissingMethodException: Method not found: 'Void DotNetNuke.Common.Globals.set_DependencyProvider(System.IServiceProvider)'.&#93;
   DotNetNuke.Web.Common.Internal.DotNetNukeHttpApplication.Application_Start(Object sender, EventArgs eventArgs) +0

&#91;HttpException (0x80004005): Method not found: 'Void DotNetNuke.Common.Globals.set_DependencyProvider(System.IServiceProvider)'.&#93;
   System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +546
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo&#91;&#93; handlers) +171
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo&#91;&#93; handlers, IntPtr appContext, HttpContext context) +173
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +255
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +347

&#91;HttpException (0x80004005): Method not found: 'Void DotNetNuke.Common.Globals.set_DependencyProvider(System.IServiceProvider)'.&#93;
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +552
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +122
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +737
</code>

 

 

 

Advanced Member
Posts: 159
Advanced Member
MVP
MVP
You're an MVP!
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?
Growing Member
Posts: 78
Growing Member

Did the module you were working on have a dnn file with it?

Maybe check the it for : 
        09.07.02 or what ever version you are running
     

 

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.

New Around Here
Posts: 6
New Around Here

 

 

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 :


  09.07.02 or what ever version you are running

 

 

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 


        09.08.00

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! 

 

 

 

Advanced Member
Posts: 159
Advanced Member
MVP
MVP
You're an MVP!
If you know what version of DNN it should have been, copy the assemblies from the install package for that version into your bin and see if that resolves it. Then mark any DNN assemblies you're referencing as Copy Local=False so it doesn't happen again
New Around Here
Posts: 6
New Around Here

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? 

Thanks! 

Advanced Member
Posts: 159
Advanced Member
MVP
MVP
You're an MVP!

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 <code><Private>False</Private></code> to reference specification in the project file.

New Around Here
Posts: 6
New Around Here

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. 

Thanks! 

These Forums are for the discussion of the open source CMS DNN platform and ecosystem.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
  2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
  3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  5. No Flaming or Trolling.
  6. No Profanity, Racism, or Prejudice.
  7. Site Moderators have the final word on approving / removing a thread or post or comment.
  8. English language posting only, please.

Would you like to help us?

Awesome! Simply post in the forums using the link below and we'll get you started.

Get Involved