DNN Forums

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

Site Inaccessible - Sequence contains more than one matching element

Sort:
You are not authorized to post a reply.
Page 1 of 212 > >>





Growing Member





    As part of a continuing saga of internal DNN frustrations, I will keep this brief.

    Our group hosts our DNN sites on Azure. Unbeknownst to us, a copy of our DNN resource was made, utilizing the same production database. At some point in time, two different instances (nearly identical to each other) were interacting with one database. This caused several problems, the biggest of which I have posted here for about which was files and modules not installing and behaving correctly.

    The public facing resource is the one to which we deploy modules; however, we are hoping to move off of it as it is not in our control. These modules only display on that resource, but I assume exist in the shared db for all of the resources. Not knowing this, I installed the module again to a second resource, to the same page. This brought the site down with the "Sequence contains more than one matching element" error.

    Does anyone have any suggestions about where in the DB to look to resolve this issue? A quick google search turns up this issue for different reasons and has not been helpful. It's almost certainly related to installing an identical module to this same page more than once.






    Veteran Member





      More details of the error trace would be helpful.
      Joe Craig
      DNN MVP
      Patapsco Research Group





      Growing Member





        I can provide the entire log file for the day, but this is the error that clearly is written to the log each time the resource is accessed:






        Growing Member





           2021-04-08 20:57:38,358 [RD0003FF11DC6C][Thread:5][ERROR] DotNetNuke.Entities.Urls.UrlRewriterUtils - System.InvalidOperationException: Sequence contains more than one matching element
             at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
             at DotNetNuke.Entities.Urls.AdvancedUrlRewriter.IgnoreRequestForWebServer(String requestedPath)
             at DotNetNuke.Entities.Urls.AdvancedUrlRewriter.IgnoreRequest(UrlAction result, String requestedPath, String ignoreRegex, HttpRequest request)
             at DotNetNuke.Entities.Urls.AdvancedUrlRewriter.ProcessRequest(HttpContext context, Uri requestUri, Boolean useFriendlyUrls, UrlAction result, FriendlyUrlSettings settings, Boolean allowSettingsChange, Guid parentTraceId)





          Veteran Member





            we would need full inner stack trace from the DNN Event Log (database table exceptions) as well





            Growing Member





              Where can I find that file? The log dumps I normally look at are the Portals/default/Logs files. If that full text is helpful, here it is:
               2021-04-08 19:15:26,771 [RD0003FF11DC6C][Thread:16][ERROR] DotNetNuke.ComponentModel.ProviderInstaller - System.Configuration.ConfigurationErrorsException: Could not load provider DotNetNuke.Providers.Caching.SimpleWebFarmCachingProvider.SimpleWebFarmCachingProvider, DotNetNuke.Providers.Caching.SimpleWebFarmCachingProvider
              2021-04-08 19:15:26,912 [RD0003FF11DC6C][Thread:16][ERROR] DotNetNuke.ComponentModel.ProviderInstaller - System.Configuration.ConfigurationErrorsException: Could not load provider DotNetNuke.Providers.FolderProviders.AzureFolderProvider.AzureFolderProvider, DotNetNuke.Providers.FolderProviders
              2021-04-08 19:15:26,943 [RD0003FF11DC6C][Thread:16][ERROR] DotNetNuke.ComponentModel.ProviderInstaller - System.Configuration.ConfigurationErrorsException: Could not load provider DotNetNuke.NavigationControl.DNNMenuNavigationProvider, DotNetNuke.DNNMenuNavigationProvider
              2021-04-08 19:15:27,006 [RD0003FF11DC6C][Thread:16][ERROR] DotNetNuke.ComponentModel.ProviderInstaller - System.Configuration.ConfigurationErrorsException: Could not load provider DotNetNuke.NavigationControl.SolpartMenuNavigationProvider, DotNetNuke.SolpartMenuNavigationProvider
              2021-04-08 19:15:27,318 [RD0003FF11DC6C][Thread:16][FATAL] DotNetNuke.Web.Common.Internal.DotNetNukeHttpApplication - System.IO.FileLoadException: Could not load file or assembly 'DotNetNuke.DNNTreeNavigationProvider' or one of its dependencies. The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020)
              File name: 'DotNetNuke.DNNTreeNavigationProvider'
                 at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
                 at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName)
                 at System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
                 at System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)
                 at System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)
                 at DotNetNuke.ComponentModel.ProviderInstaller.InstallProvider(IContainer container, Provider provider)
                 at DotNetNuke.ComponentModel.ProviderInstaller.InstallComponents(IContainer container)
                 at DotNetNuke.ComponentModel.ComponentFactory.InstallComponents(IComponentInstaller[] installers)
                 at DotNetNuke.Web.Common.Internal.DotNetNukeHttpApplication.Application_Start(Object sender, EventArgs eventArgs)
              
              WRN: Assembly binding logging is turned OFF.
              To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
              Note: There is some performance penalty associated with assembly bind failure logging.
              To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
              
              2021-04-08 19:15:27,725 [RD0003FF11DC6C][Thread:5][ERROR] DotNetNuke.Services.Exceptions.Exceptions - System.NullReferenceException: Object reference not set to an instance of an object.
                 at DotNetNuke.Application.ApplicationStatusInfo.HasDataProviderLogFiles()
                 at DotNetNuke.Application.ApplicationStatusInfo.IsInstalled()
                 at DotNetNuke.Application.ApplicationStatusInfo.get_Status()
                 at DotNetNuke.Services.Log.EventLog.LogController.AddLog(LogInfo logInfo)
                 at DotNetNuke.Common.Initialize.LogEnd()
              2021-04-08 19:15:27,756 [RD0003FF11DC6C][Thread:5][ERROR] DotNetNuke.Web.Common.Internal.DotNetNukeHttpApplication - System.NullReferenceException: Object reference not set to an instance of an object.
                 at DotNetNuke.Application.ApplicationStatusInfo.HasDataProviderLogFiles()
                 at DotNetNuke.Application.ApplicationStatusInfo.IsInstalled()
                 at DotNetNuke.Application.ApplicationStatusInfo.get_Status()
                 at DotNetNuke.Services.Log.EventLog.LogController.AddLog(LogInfo logInfo)
                 at DotNetNuke.Services.Log.EventLog.ExceptionLogController.AddLog(Exception objException, LogInfo log, ExceptionLogType logType)
                 at DotNetNuke.Services.Log.EventLog.ExceptionLogController.AddLog(Exception objException, ExceptionLogType logType)
                 at DotNetNuke.Services.Exceptions.Exceptions.LogException(Exception exc)
                 at DotNetNuke.Common.Initialize.LogEnd()
                 at DotNetNuke.Web.Common.Internal.DotNetNukeHttpApplication.Application_End(Object sender, EventArgs eventArgs)
              2021-04-08 19:15:27,756 [RD0003FF11DC6C][Thread:5][ERROR] DotNetNuke.Web.Common.Internal.DotNetNukeHttpApplication - System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
                 at DotNetNuke.Application.ApplicationStatusInfo.HasDataProviderLogFiles()
                 at DotNetNuke.Application.ApplicationStatusInfo.IsInstalled()
                 at DotNetNuke.Application.ApplicationStatusInfo.get_Status()
                 at DotNetNuke.Services.Scheduling.SchedulingProvider..ctor()
                 at DotNetNuke.Services.Scheduling.DNNScheduler..ctor()
                 --- End of inner exception stack trace ---
                 at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
                 at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
                 at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
                 at System.Activator.CreateInstance(Type type, Boolean nonPublic)
                 at System.Activator.CreateInstance(Type type)
                 at DotNetNuke.ComponentModel.SingletonComponentBuilder.BuildComponent()
                 at DotNetNuke.ComponentModel.SimpleContainer.GetComponent(Type contractType)
                 at DotNetNuke.ComponentModel.AbstractContainer.GetComponent[TContract]()
                 at DotNetNuke.ComponentModel.ComponentFactory.GetComponent[TContract]()
                 at DotNetNuke.Common.Initialize.StopScheduler()
                 at DotNetNuke.Web.Common.Internal.DotNetNukeHttpApplication.Application_End(Object sender, EventArgs eventArgs)
              2021-04-08 20:33:14,695 [RD0003FF11DC6C][Thread:5][ERROR] DotNetNuke.Entities.Urls.UrlRewriterUtils - System.InvalidOperationException: Sequence contains more than one matching element
                 at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
                 at DotNetNuke.Entities.Urls.AdvancedUrlRewriter.IgnoreRequestForWebServer(String requestedPath)
                 at DotNetNuke.Entities.Urls.AdvancedUrlRewriter.IgnoreRequest(UrlAction result, String requestedPath, String ignoreRegex, HttpRequest request)
                 at DotNetNuke.Entities.Urls.AdvancedUrlRewriter.ProcessRequest(HttpContext context, Uri requestUri, Boolean useFriendlyUrls, UrlAction result, FriendlyUrlSettings settings, Boolean allowSettingsChange, Guid parentTraceId)
              2021-04-08 20:57:38,358 [RD0003FF11DC6C][Thread:5][ERROR] DotNetNuke.Entities.Urls.UrlRewriterUtils - System.InvalidOperationException: Sequence contains more than one matching element
                 at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
                 at DotNetNuke.Entities.Urls.AdvancedUrlRewriter.IgnoreRequestForWebServer(String requestedPath)
                 at DotNetNuke.Entities.Urls.AdvancedUrlRewriter.IgnoreRequest(UrlAction result, String requestedPath, String ignoreRegex, HttpRequest request)
                 at DotNetNuke.Entities.Urls.AdvancedUrlRewriter.ProcessRequest(HttpContext context, Uri requestUri, Boolean useFriendlyUrls, UrlAction result, FriendlyUrlSettings settings, Boolean allowSettingsChange, Guid parentTraceId)
              





              Veteran Member





                there seem to be still references to old, removed providers in your web.config file.
                DNN is unable to load outdated navigation providers, did you recently upgrade DNN or remove providers?
                besides, there are errors writing to the log file and there seem to be duplicate entries in TabUrls table.






                Growing Member





                  To my knowledge the install hasn't been upgraded or changed since December or early January when we upgraded to 9.8. This issue began in March after installing a module to a page that already had that module installed on alias.

                  The site is fairly static and only has new development once maybe every four months. This particular issue began immediately after installing a module on a page that was supposed to already have it (and did on an alias) and then refreshing the page when it didn't display. 

                  I'll look at TabUrls and the webconfig - Are the tables that are written to when a module is installed? I could check those for duplicate rows as well. Or the module install could have simply been the straw that broke the camel's back.

                   






                  Veteran Member





                    there are a number of tables being written upon module install (ModuleDefinitions, DesktopModules, PortalDesktopmodules and others) and other tables, when a module is placed on a page (Modules, TabModules, ModuleSettings, TabModuleSettings, ModulePermissions and module specific tables as well).
                    System.InvalidOperationException: Sequence contains more than one matching element indicates, the error is happening in advanced URL rewriter, which tries to resolve page to load for an URL. this uses TabURLs, tabs and PortalAlias table.





                    Veteran Member





                      Posted By hbilbrey on 12 Apr 2021 12:37 PM

                      As part of a continuing saga of internal DNN frustrations, I will keep this brief.

                      At some point in time, two different instances (nearly identical to each other) were interacting with one database.

                      Do you mean you have 2 DNN installations using the same database (might lead to a lot of issues)?
                      Or 2 DNN portals within the same DNN installation (normal user case)?

                       

                      You are not authorized to post a reply.
                      Page 1 of 212 > >>

                      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:

                      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