Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DotNetNuke.UI.Modules.IModuleControlPipeline - Crash #4314

Closed
5 of 9 tasks
pkExec opened this issue Nov 17, 2020 · 8 comments
Closed
5 of 9 tasks

DotNetNuke.UI.Modules.IModuleControlPipeline - Crash #4314

pkExec opened this issue Nov 17, 2020 · 8 comments

Comments

@pkExec
Copy link

pkExec commented Nov 17, 2020

Description of bug

After an indeterminate amount of time, site crashes with the following error on log:

[ERROR] DotNetNuke.Services.Exceptions.Exceptions - DotNetNuke.Services.Exceptions.PageLoadException: Unhandled error loading page. ---> System.InvalidOperationException: No service for type 'DotNetNuke.UI.Modules.IModuleControlPipeline' has been registered.
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at DotNetNuke.UI.Skins.Skin..ctor()

By recycling the IIS application pool, or by forcing a recompilation, the issue is fixed.

Is this a regression on #2806 maybe?

Error information

[ERROR] DotNetNuke.Services.Exceptions.Exceptions - DotNetNuke.Services.Exceptions.PageLoadException: Unhandled error loading page. ---> System.InvalidOperationException: No service for type 'DotNetNuke.UI.Modules.IModuleControlPipeline' has been registered.
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at DotNetNuke.UI.Skins.Skin..ctor()
   at ASP.portals__default_skins_dnnbootsterv2_home_ascx..ctor()
   at __ASP.FastObjectFactory_app_web_50qugp1r.Create_ASP_portals__default_skins_dnnbootsterv2_home_ascx()
   at System.Web.UI.TemplateControl.LoadControl(IWebObjectFactory objectFactory, VirtualPath virtualPath, Type t, Object[] parameters)
   at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath)
   at DotNetNuke.UI.ControlUtilities.LoadControl[T](TemplateControl containerControl, String ControlSrc)
   at DotNetNuke.UI.Skins.Skin.LoadSkin(PageBase page, String skinPath)
   --- End of inner exception stack trace ---

Affected version

  • 10.00.00 alpha build
  • 09.08.00 release candidate
  • 09.07.02 latest supported release

Affected browser

  • Chrome
  • Firefox
  • Safari
  • Internet Explorer 11
  • Microsoft Edge (Classic)
  • Microsoft Edge Chromium
@bdukes
Copy link
Contributor

bdukes commented Nov 17, 2020

You said "forcing a recompilation" fixes the issue, are you recompiling the platform code? In general usage, you shouldn't need to adjust the platform code to use DNN. Leave the platform code as-is, and use the many built-in extension points to adjust the site. If that's not what you mean, let us know what steps you're taking to get here.

@pkExec
Copy link
Author

pkExec commented Nov 17, 2020

Forcing the recompilation is for example by making a change in web.config:
<compilation debug="false" strict="false" targetFramework="4.7.2">
to
<compilation debug="true" strict="false" targetFramework="4.7.2">
and vice-versa

@valadas
Copy link
Contributor

valadas commented Nov 17, 2020

Oh, that is not a recompilation, it just causes the site to reload

@valadas
Copy link
Contributor

valadas commented Nov 17, 2020

Are you able to make the issue happen also using the default theme, it looks like on you second log it is pointing at the theme.

@pkExec
Copy link
Author

pkExec commented Dec 4, 2020

Are you able to make the issue happen also using the default theme, it looks like on you second log it is pointing at the theme.

Yes, it happens with the default theme too. Also, the skin doesn't seem to be related, because even if I replace it with an "empty" skin, it still occurs.
This may have to do with an App_Code folder of the project that has carried over from previous versions, looking into it.

@pkExec
Copy link
Author

pkExec commented Dec 4, 2020

This may have to do with an App_Code folder of the project

Indeed this seems to be it:
If you have custom code in App_Code folder, it will work properly the first time, and then fail on reload with the cryptic "DotNetNuke.UI.Modules.IModuleControlPipeline" message.
If you compile your code into a class library (.dll), paste it into "bin" folder and remove the App_Code folder, it will work properly without crash.

The hint was from this thread: https://dnncommunity.org/forums/aft/1153

Maybe it's more of a documentation issue than a bug then: It should mention on the installation page not to use App_Code folders any more.

@pkExec
Copy link
Author

pkExec commented Feb 18, 2021

I was wrong, this still occurs even after compiling the code into a class library. It also still occurs on latest version 9.8.1

@pkExec
Copy link
Author

pkExec commented Mar 9, 2021

I think I've narrowed it down: the project used the old translation provider "BrandonHaynes.DotNetNukeResXBuildProvider.ResXBuildProvider".
This continued to work normally until version 9.0 of DNN. In version 9.0, it works for a few page loads, and then crashes with the current issue.
So, I think we can close this as not a DNN issue.

@pkExec pkExec closed this as completed Mar 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants