An error occurred while attaching module (Dynamicweb.Frontend.Content)

System.Data.SqlClient.SqlException (0x80131904): Connection Timeout Expired.  The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement.  This could be because the pre-login handshake failed or the server was unable to respond back in time.  The duration spent while attempting to connect to this server was - [Pre-Login] initialization=8506; handshake=13336;  ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out
   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.Open()
   at Dynamicweb.Data.DatabaseConnectionProvider.CreateConnection(Boolean open)
   at Dynamicweb.Data.Database.CreateConnection()
   at Dynamicweb.Data.Database.CreateDataReader(CommandBuilder commandBuilder, IDbConnection connection, IDbTransaction transaction, Int32 commandTimeout)
   at Dynamicweb.Ecommerce.Products.GroupFacetRepository.GetGroupFacets()
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.CreateView(IEnumerable`1 facetGroups, IDictionary`2 facetGroupResults, IDictionary`2 facetParameters, IEnumerable`1 queryParameters, Boolean showFacetOptionsWithNoResults)
   at Dynamicweb.Ecommerce.ProductCatalog.ViewModelFactory.CreateView(IEnumerable`1 facetGroups, IDictionary`2 facetGroupResults, IDictionary`2 facetParameters, IEnumerable`1 queryParameters, Boolean showFacetOptionsWithNoResults)
   at Dynamicweb.Ecommerce.Indexing.ProductQueryHelper.GetProductsAutoIdsFromIndexQuery(IQuery query, ProductCatalogSettings settings, QuerySettings querySettings, IEnumerable`1& facetViewModel, IEnumerable`1& spellCheckerResult)
   at Dynamicweb.Ecommerce.ProductCatalog.ProductCatalogFrontend.RenderProductList(ProductCatalogSettings settings, QuerySettings querySettings, IQuery query, String groupId, Boolean feed)
   at Dynamicweb.Ecommerce.ProductCatalog.ProductCatalogFrontend.GetContent()
   at Dynamicweb.Frontend.Content.GetModuleOutput(Paragraph paragraph, PageView pageview)
ClientConnectionId:9bf2fb45-5877-4791-a8ec-1d72a45c2da8
Error Number:-2,State:0,Class:11

Please use the filter to find specific products. Need help? Call us at +45 43 86 83 33.

Error executing template "/Designs/Swift/Paragraph/CustomGroupNavigation.cshtml"
System.Data.SqlClient.SqlException (0x80131904): Connection Timeout Expired.  The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement.  This could be because the pre-login handshake failed or the server was unable to respond back in time.  The duration spent while attempting to connect to this server was - [Pre-Login] initialization=8506; handshake=13336;  ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out
   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.Open()
   at Dynamicweb.Data.DatabaseConnectionProvider.CreateConnection(Boolean open)
   at Dynamicweb.Data.Database.CreateConnection()
   at Dynamicweb.Data.Database.CreateDataReader(String sql, IDbConnection connection, IDbTransaction transaction, Int32 commandTimeout, Dictionary`2 sqlParams)
   at Dynamicweb.Ecommerce.Products.GroupShopRelation.get_CachedGroupShopRelations(GroupShopRelationType type)
   at Dynamicweb.Ecommerce.Products.GroupShopRelation.get_GroupShopRelationByGroupId(String theGroupId, String theShopId)
   at Dynamicweb.Ecommerce.Products.Group.get_IsTopGroup()
   at Dynamicweb.Ecommerce.Shops.Shop.GetTopLevelGroups(String languageId)
   at Dynamicweb.Ecommerce.Frontend.Navigation.GroupNavigationTreeNodeProvider.GetGroupsBySettings(PageNavigationSettings ecomSettings)
   at Dynamicweb.Ecommerce.Frontend.Navigation.GroupNavigationTreeNodeProvider.GetGroups(NavigationTreeNode parent, Page page)
   at Dynamicweb.Ecommerce.Frontend.Navigation.GroupNavigationTreeNodeProvider.GetNodes(NavigationContext context, NavigationSettings settings, NavigationTreeNode parent)
   at System.Linq.Enumerable.<SelectManyIterator>d__17`2.MoveNext()
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.Count[TSource](IEnumerable`1 source)
   at CompiledRazorTemplates.Dynamic.RazorEngine_64f744c8d7e54a59bf348ae40c601bf8.Execute() in D:\dynamicweb.net\Solutions\brdklee.cloud.dynamicweb-cms.com\files\Templates\Designs\Swift\Paragraph\CustomGroupNavigation.cshtml:line 16
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
   at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()
ClientConnectionId:9bf2fb45-5877-4791-a8ec-1d72a45c2da8
Error Number:-2,State:0,Class:11

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Rendering 3 @using Dynamicweb.Frontend.Navigation 4 @using Dynamicweb.Ecommerce.Products 5 @using Dynamicweb.Ecommerce.ProductCatalog 6 @using System.IO 7 <link href="/Files/Templates/Designs/Swift/Assets/css/custom-group-navigation.css" rel="stylesheet" /> 8 @{ 9 var navigationSettings = new NavigationSettings(); 10 navigationSettings.StartLevel = 2; 11 navigationSettings.Parameters.Add("menu-id", "product-group-list"); 12 13 var navigationViewModel = Navigation.GetNavigationViewModel(navigationSettings); 14 } 15 16 @if (navigationViewModel.Nodes.Count() > 0) 17 { 18 if (Pageview.IsVisualEditorMode) 19 { 20 <div class="alert alert-dark m-0" role="alert"> 21 <span><i class="fas fa-info-circle mr-3"></i></span> <span>@Translate("Group list: The selected groups will be shown here, if any")</span> 22 </div> 23 } 24 else 25 { 26 @GetNodes(navigationViewModel.Nodes) 27 } 28 } 29 else if (Pageview.IsVisualEditorMode) 30 { 31 <div class="alert alert-dark m-0" role="alert"> 32 <span><i class="fas fa-info-circle mr-3"></i></span> <span>@Translate("Group list: The selected groups will be shown here, if any")</span> 33 </div> 34 } 35 36 @helper GetNodes(IEnumerable<Dynamicweb.Frontend.Navigation.NavigationTreeNodeViewModel> nodes) 37 { 38 foreach (var node in nodes) 39 { 40 if (node.IsActive) 41 { 42 if (node.Nodes.Count() > 0) 43 { 44 @RenderNodes(node.Nodes) 45 } 46 } 47 else 48 { 49 if (node.Nodes.Count() > 0) 50 { 51 @GetNodes(node.Nodes) 52 } 53 } 54 } 55 } 56 57 @helper RenderNodes(IEnumerable<Dynamicweb.Frontend.Navigation.NavigationTreeNodeViewModel> nodes) 58 { 59 60 61 int groupsCount = 0; 62 63 foreach (var node in nodes) 64 { 65 IList<FieldValueViewModel> groupFields = node.GetProductGroup().GroupFields; 66 67 if (groupFields != null) 68 { 69 foreach (FieldValueViewModel field in groupFields) 70 { 71 if (field.SystemName == "SelectedGroup" && !string.IsNullOrEmpty(field.Value.ToString())) 72 { 73 if (Convert.ToBoolean(field.Value.ToString())) 74 { 75 groupsCount++; 76 } 77 } 78 } 79 } 80 } 81 82 if (groupsCount != 0) 83 { 84 85 <div class="container py-4 flex-container"> 86 <div class="row"> 87 @foreach (var node in nodes) 88 { 89 string groupImage = ""; 90 var group = Dynamicweb.Ecommerce.Services.ProductGroups.GetGroup(node.GroupId); 91 IList<FieldValueViewModel> groupFields = node.GetProductGroup().GroupFields; 92 93 if (!string.IsNullOrEmpty(node.GroupId)) 94 { 95 groupImage = !string.IsNullOrEmpty(group.SmallImage) ? "/Files" + group.SmallImage : groupImage; 96 } 97 98 bool showGroup = false; 99 100 if (groupFields != null) 101 { 102 foreach (FieldValueViewModel field in groupFields) 103 { 104 if (field.SystemName == "SelectedGroup" && !string.IsNullOrEmpty(field.Value.ToString())) 105 { 106 if (Convert.ToBoolean(field.Value.ToString())) 107 { 108 showGroup = true; 109 } 110 } 111 } 112 } 113 114 if (showGroup) 115 { 116 <div class="col-2 p-2 d-flex flex-column justify-content-start flex-item"> 117 <a href="@node.Link" tabindex="-1" class="text-decoration-none" style="display:contents"> 118 @if (!string.IsNullOrWhiteSpace(groupImage)) 119 { 120 <div class="wrapper-img"> 121 <img src="/Admin/Public/GetImage.ashx?image=@groupImage&width=230&height=230&crop=5&format=webp" class="image-style lazy" /> 122 </div> 123 } 124 else 125 { 126 <div class="no-image"> 127 <img loading="lazy" src="/Admin/Public/GetImage.ashx?image=Files/Images/missing_image.jpg&width=280&height=280&crop=5" style="object-fit: contain" alt="@node.Name"> 128 </div> 129 } 130 <div class="px-2 mt-auto"> 131 <span class="px-2 fs-7"> 132 @node.Name 133 </span> 134 <div> 135 <span class="opacity-50 fs-7">(@group.Products.Count())</span> 136 </div> 137 </div> 138 </a> 139 </div> 140 } 141 } 142 143 </div> 144 </div> 145 } 146 } 147 148 149
By clicking 'Accept All' you consent that we may collect information about you for various purposes, including: Functionality, Statistics and Marketing