Exception in template (Designs\santax\_partials/redirect.cshtml): MaxMind.GeoIP2.Exceptions.InvalidRequestException: You do not have sufficient funds to use this service.
at MaxMind.GeoIP2.WebServiceClient.HandleResponse[T](Response response)
at MaxMind.GeoIP2.WebServiceClient.Execute[T](String type, IPAddress ipAddress)
at Co3.Dw9.Redirect.Dw.Repositories.RedirectRepository.GetRedirectResponse()
at Co3.Dw9.Redirect.Dw.Services.RedirectService.GetRedirectInfo()
at CompiledRazorTemplates.Dynamic.cbecccbce.Execute()
at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context)
at RazorEngine.Templating.TemplateService.Run(ITemplate template, DynamicViewBag viewBag)
at RazorEngine.Templating.TemplateService.Parse(String razorTemplate, Object model, DynamicViewBag viewBag, String cacheName)
at RazorEngine.Razor.Parse[T](String razorTemplate, T model, String cacheName)
at Dynamicweb.Rendering.Template.RenderRazorTemplate()
@inherits RazorTemplateBase<RazorTemplateModel<Template>> @using Co3.Dw9.Redirect.Dw.Models @using Co3.Dw9.Redirect.Dw.Services @using Dynamicweb.Configuration @using Dynamicweb.Rendering @using System.Web; @{ //// Working, but is hackety compared to how you would normally take over the caching layer in Co3.Reidrect by autofac'ing. There is not enough time for this here. ///// AD 2019-12-11 : #7223 - "full geoblock", keep redirecting user if they are on the wrong website. NEW: Customer changed their mind and want a redirect once per session. /// Checking with session variable first to prevent redirect service for using unnessacry lookups in maxminds bool doRedirect = false; string sessionVarName = "Co3.Santax.Redirected"; string geoVarName = "geo"; string geovalue = HttpContext.Current.Request[ geoVarName ] != null ? HttpContext.Current.Request[ geoVarName ].ToString() : string.Empty; if ( geovalue.ToLower() == "true" ) { HttpContext.Current.Session.Add( sessionVarName, "true" ); } string sessionValue = HttpContext.Current.Session[ sessionVarName ] != null ? HttpContext.Current.Session[ sessionVarName ].ToString() : string.Empty; if ( sessionValue.ToLower() != "true" ) { HttpContext.Current.Session.Add( sessionVarName, "true" ); doRedirect = true; } if ( doRedirect ) { IRedirectResponse redirectInfo = RedirectService.Instance.GetRedirectInfo(); if ( redirectInfo != null && redirectInfo.SuggestRedirect ) { string redirectConsentExpirationTimeInDays = SystemConfiguration.Instance.GetValue( "/Globalsettings/Co3.Espresso/GeoRedirect/CookieExpireTimeInDays" ); string redirectMessage = Translate( "Redirect message - Text", "You are visiting our website in {{CurrentLanguage}}. Would you like to visit the {{SuggestedLanguage}} site?" ); redirectMessage = redirectMessage.Replace( "{{CurrentLanguage}}", redirectInfo.CurrentLanguageName.ToLower() ); redirectMessage = redirectMessage.Replace( "{{SuggestedLanguage}}", redirectInfo.SuggestedLanguageName.ToLower() ); string linkToSuggestedArea = string.Format( "http://{0}", redirectInfo.SuggestedArea.DomainLock ); HttpContext.Current.Response.Redirect( linkToSuggestedArea, true ); <div class="fade modal" id="js-e-redirect-msg" data-redirect-consent-expiration="@redirectConsentExpirationTimeInDays" data-dismiss="modal"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title small"> <i class="material-icons material-icons-large text-primary">language</i> <span>@Translate( "Redirect message - Title", "Change language" )</span> </h4> <button class="close" data-dismiss="modal" type="button"> <i class="material-icons">close</i> </button> </div> <div class="modal-body pb-0"> <h2>@Translate( "Redirect message - Heading", "Welcome" )</h2> <p class="lead"> @redirectMessage </p> </div> <div class="border-top-0 modal-footer"> <a class="btn btn-secondary mr-1" href="@linkToSuggestedArea">@Translate( "Redirect message - Accept - Button", "Yes, take me there" )</a> <a class="btn btn-primary" data-dismiss="modal" href="#js-e-redirect-msg">@Translate( "Redirect message - Decline - Button", "No thanks" )</a> </div> </div> </div> </div> } } }

ULTRALJUD

Ultraljudutrustning från Santax Medico

tune Filtrera produkter

  1. 1
keyboard_arrow_up