Quantcast
Channel: Optimizely Search & Navigation
Viewing all 6894 articles
Browse latest View live

How can i write a custom filter in tab “Insight" to show abandoned cart (carts not updated for about X hours)

$
0
0

I have been used Episerver Insight to tracking all event of cart and now i want to show abandoned cart (carts not updated for about X hours) in insight tab

How can i write a custom filter in tab “Insight" to show abandoned cart (carts not updated for about X hours)?

Can anybody give me solution?

Regards,

Thang Le


A lot of exceptions in Azure App Insights

$
0
0

Hi everyone, we have an Epi site with CMS 11.15.0 and Commerce 13.18.2, hosted in an Azure appservice. It is registering a lot of exceptions in Azure Insights, and we just don't know where are those coming from. The ones with most occurrences and with no easy explanation are:

1. CheckVirtualFileExists

This one happens on every .aspx request that does not exist. We use the 404 Geta handler, and it redirects to our "not found page" correctly, but it logs a lot of these exceptions in azure. 

System.Web.HttpException:
   at System.Web.UI.Util.CheckVirtualFileExists (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
   at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
   at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
   at System.Web.UI.PageHandlerFactory.GetHandlerHelper (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
   at System.Web.UI.PageHandlerFactory.GetHandler (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
   at System.Web.HttpApplication+MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
   at System.Web.HttpApplication+<>c__DisplayClass285_0.<ExecuteStepImpl>b__0 (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
   at System.Web.HttpApplication+StepInvoker.Invoke (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
   at System.Web.HttpApplication+StepInvoker+<>c__DisplayClass4_0.<Invoke>b__0 (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
   at Microsoft.AspNet.TelemetryCorrelation.TelemetryCorrelationHttpModule.OnExecuteRequestStep (Microsoft.AspNet.TelemetryCorrelation, Version=1.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Web.HttpApplication+<>c__DisplayClass284_0.<OnExecuteRequestStep>b__0 (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
   at System.Web.HttpApplication+StepInvoker.Invoke (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
   at System.Web.HttpApplication.ExecuteStepImpl (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
   at System.Web.HttpApplication.ExecuteStep (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)

From the IIS logs on azure:

2020-07-20 22:23:38 AZAPP-NXS-EPI-CMS-PREP-01__E284 GET /search.aspx 404;https://azapp-nxs-epi-cms-prep-01__e284:80/search.aspx?page=11&category=953&X-ARR-LOG-ID=77c41081-2434-4707-a9e4-966b3c94b9c3 443

Testing the same url, but in my local environment (note no 404):

2020-07-20 23:13:43 127.0.0.1 GET /search.aspx page=11&category=953 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/83.0.4103.116+Safari/537.36 - 200 0 0 1141

2. Server cannot append header after HTTP headers have been sent. 

System.Web.HttpException:
   at System.Web.HttpResponse.AppendHeader (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
   at System.Web.HttpResponseWrapper.AppendHeader (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
   at EPiServer.Web.MediaHandlerBase.CheckIsModifiedAndAddETag (EPiServer.Framework.AspNet, Version=11.15.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7)
   at EPiServer.Web.MediaHandlerBase.NotModifiedHandling (EPiServer.Framework.AspNet, Version=11.15.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7)
   at EPiServer.Web.BlobHttpHandler.ProccessBlobRequest (EPiServer.Cms.AspNet, Version=11.15.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7)
   at EPiServer.Web.BlobHttpHandler.ProcessRequestAsyncInternal (EPiServer.Cms.AspNet, Version=11.15.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7)
   at EPiServer.Web.BlobHttpHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest (EPiServer.Cms.AspNet, Version=11.15.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7)
   at System.Web.HttpApplication+CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
   at System.Web.HttpApplication+<>c__DisplayClass285_0.<ExecuteStepImpl>b__0 (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
   at System.Web.HttpApplication+StepInvoker.Invoke (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
   at System.Web.HttpApplication+StepInvoker+<>c__DisplayClass4_0.<Invoke>b__0 (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
   at Microsoft.AspNet.TelemetryCorrelation.TelemetryCorrelationHttpModule.OnExecuteRequestStep (Microsoft.AspNet.TelemetryCorrelation, Version=1.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Web.HttpApplication+<>c__DisplayClass284_0.<OnExecuteRequestStep>b__0 (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
   at System.Web.HttpApplication+StepInvoker.Invoke (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
   at System.Web.HttpApplication.ExecuteStepImpl (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
   at System.Web.HttpApplication.ExecuteStep (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)

This one is the most random exception. Happens a lot when trying to access to images. I had a chat with Epi Support, they asked me to review my redirects, which I did and error is still happening. This can't be reproduced in my local environment either. 

These two exceptions happen a lot during the day, this is just a report from the past 6 hours: 

Hope any of you have seen this before and have some insight on to what might be happening. We use azure deployment slots to decrease downtime, not sure if that can be an issue.

Thanks!

Unexpected URL's in multilanguage site

$
0
0

Hi,

By coincidence, I discovered a strange behaviour in Episerver CMS routing (v11.23.7.0). Let's say my site has multiple languages: Dutch and English. I have translated the same page into both of these languages and so I have 2 different URL's:

  • http://localhost:51481/diensten/cadac-geavanceerde-ondersteuning
  • http://localhost:51481/en/services/cadac-advanced-support

It turns out that the following URL is also working for the Dutch version: http://localhost:51481/services/cadac-geavanceerde-ondersteuning.

So, if I replace a part of the Dutch URL with the English version, it's still working and not giving a 404. Any idea how this can be possible and how to avoid this?

Kind regards 

Bart

Customise FIND Result

$
0
0

Hi ,

Find Query that should satisfy the following conditions.

  1. Must match *searchKey*
  2. Should also match searchKey
  3. Should also match searchKey*

Now we have implemented the following query for above but it also returns the matches for *searchKey which we don't need in results.

ITypeSearch<T> query = SearchClient.Instance.Search<T>().For(searchKey, q =>
                                                {
                                                    q.Query = string.Concat("*", searchKey, "*");
                                                }).WithAndAsDefaultOperator().UsingSynonyms();

Kindly help us.

Thanks,

Mekala V

Table referenced for NodeContent (Category nodecontent)

$
0
0

There's a significant update that I need to make happen on our database to update phone numbers saved in NodeContent for our Category structure. There is a BottomContent xhtmlstring(EPiServer.Core.XhtmlString) that is created on our Category's that our content team has added contact information to, and I'd like to be able to do a mass update of this phone number data so they don't have to go in and update it manually. Where should I be looking in the Epi tables (i'm assuming the commerce DB) in order to find these records?

The plan is to put a query together, test locally, then submit to DXC services to perform the update once I'm satisfied that the update is working correctly. 

Forms in iframes... or not?

$
0
0

Hi All,

Hope you are staying safe.

I'll provide some background to what I'm trying to do, just incase I'm focusing on solving the wrong problem!

Background:

We recently implemented a caching strategy with the help of EPiServer's own Johan Antila. It's a full page cache based on David Knipe's caching with Visitor Groups, in which Johan modified the solution to also work with A/B testing. And it's awesome, we saw our TTFB drop from around 1 - 2s down to 200 - 500ms when the cached version of a page is requested. We are super happy, but then we discovered we had overlooked Forms! (how could we!?!) Antiforgery tokens and caching don't mix :/

I quickly modified the implementation to not cache a page if there was a form present, but a significant portion of our pages have a form on and it's ruining the good vibes. On top of that, we know that this is only a temporary solution until we can work out how to handle forms. Maybe some kind of donut hole caching mixed in with what we have? Or forms in an iframe?

My journey so far:

Given how close we are with the caching implementation, I've shied away from any donuts and I guess I fear that I'll end up going down that road eventually. But not before I've exhausted the iframe possibility.

And I feel like I've got quite far with an iframe solution. I've created an iframe block type. I've created a new form container page type to only hold a single form, and restricted the iframeblock to only reference a single one of these new formcontainerpages. The formcontainpage has it's own layout so I'm able to strip out any calls to the main site's javascript files and redundant meta tags etc and the result is a page containing just a form being loaded inside an iframe. The parent page is cached nicely and the iframed form container page is not, the antiforgerytoken stuff is all happy and forms are basically working.

Gotchas:

We like a thank you page! When users complete a form they are generally taken to a thank you page and we use that hit for conversion tracking etc. But no one wants to see the thank you page loaded just inside the iframe... I can of course write some js to use the MutationObserver api to detect when the iframe changes url and use that to redirect the parent page of the iframe, but this of course results in two hits to the thank you page and that just won't do.

For seemingly obvious security reasons, you can't use a window's onbeforeload event to grab the intended destination page and stop the iframe from requesting the thank you page before redirecting the parent page.

I thought perhaps I could hook into FormSubmissionFinalized event from Forms and somehow see the final destination url there, but I can't even see that firing even though the submission data in the CMS shows as finalized. But given the data submission stuff is all handled on the server, that was probablly a silly idea in the first place.

So I began wondering about custom actors. Could I write a custom actor which would optionally overwrite the redirecturl functionality of the forms and somehow hook that into the iframe to post a message to the parent and force the parent page to redirect instead?

My question(s):

So finally to my questions. Is that possible? How would that even work?

I've been looking at the decompiled code from Forms and from Forms.Demo and I can't quite see yet how that is implemented. I'm guessing that there'll be some code doing something like RedirectToAction(RedirectUrl? + FormSessionData) and I'd need an actor to overwrite that method. But then what? a custom action method which passes the data to a script I can then use in the iframe to assign window.top.location.href ?? I'm not really sure.

Am I barking up the completely wrong tree? Is the approach I am trying to take just not possible?

If anyone can help, I would be so so so grateful!

All the best,
Alex

SQL error installing EPiServer CMS 6 R2

$
0
0

..on a Windows 7 x64 machine with SQL Server Express R2 and Visual Studio 2010.

 

The actual installation was fine, I'm just having trouble running a newly created EPiServer project with the Visual Studio tools. If I follow the instructions listed here[1], when I press F5 (step 3 of the first section) I get the following error:

 

"A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)"

Stack Trace: 

[SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4856727

 

Am I missing something? The example website (Alloy Tech) runs fine when I create it with the deployment center.

 

[1] http://sdk.episerver.com/library/cms6.1/Developers%20Guide/Setting%20Up%20a%20New%20EPiServer%20Site%20with%20Visual%20Studio.htm

How to make a block type A global asset in Episerver?

$
0
0

How to make a block type A global asset in Episerver so that it can be used globally?


Can i disable SessionState in PageControllerBase

$
0
0

Hi Team,

As of now, I am not using any Sessions in my application so i am planning to disable SessionState in Base controller level to improve the performance. Below is code which i am doing.

[SessionState(System.Web.SessionState.SessionStateBehavior.Disabled)]
public abstract class PageControllerBase<T> : PageController<T>
where T : SitePageData
{

}

So my question here is, If i disable session anything will break in CMS features? Is there any dependency with session across the CMS platform.

Thanks,

Suresh B

Can we use Service Bus Queue for emails in Episerver DXC

$
0
0

Hi Team,

My application is hosted in Episerver DXC and using CMS platform. As of now Emails are sending synchronusly and taking almost average of 1 second to send email.

I want to move this process into queue mechanism. As DXC in Azure, so Is episerver DXC will allow us to use Service Bus queue integration?

I am maintaing all application email templates into CMS and using [PlaceHolder] to replace dynamic content during sending email. So i want to move this complete logic into queue(i.e. Reading CMS template data from CMS database and replacing [PlaceHolders] with dynamic content and finally sending emails). 

Is it best approach? or Can anyone please let me know other best solutions to acheive this feature in DXC platform?

Thanks,

Suresh B

UserID from User Table

$
0
0

Hello, all I am trying to make a simple request to retrieve the UserID from the Users Table after they have registered the user. 

I have read that there are calls on Commerce Server to get this info:

PrincipalInfo.CurrentPrincipal.GetContactId()

For user name and email:

var customerContact = PrincipalInfo.CurrentPrincipal.GetCustomerContact(); 

However I cannot find anything on the CMS side that will do the same thing. Any help would be appreciated. 

Restrict Content Area only to add Links

$
0
0

How to Restrict Content Area only to add Links?

Logout not working, .AspNet.ApplicationCookie is not being deleted

$
0
0

When I click on logout I am taken to util/logout.aspx however when I navigate back to the main page of our website I am still logged in and can access the CMS backend.

From what I can tell the cookie .AspNet.ApplicationCookie is not being deleted.

In our PageControllerBase.cs we have:

        public ActionResult Logout()
        {
            UISignInManager.Service.SignOut();
            return RedirectToAction("Index");
        }

Which when I compare it to the Alloy EpiServer demo appears to be identitical.

Where else do I need to look to check what could be the issue?

In case it is also relevant, we are using a custom login page:

namespace Project.Site.Controllers
{
    public class CustomLoginController : Controller
    {
        private UISignInManager uiSignInManager = ServiceLocator.Current.GetInstance<UISignInManager>();
        private UIUserProvider uiUserProvider = ServiceLocator.Current.GetInstance<UIUserProvider>();
        public ActionResult Index()
        {
            return View(Global.CustomLoginView);
        }
        [HttpPost]
        [AllowAnonymous]
        [ValidateAntiForgeryToken]
        [ValidateInput(false)]
        public ActionResult LocalLogin(CustomLoginViewModel model)
        {
            if (ModelState.IsValid)
            {
                bool result = uiSignInManager.SignIn(uiUserProvider.Name, model.Username, model.Password);
                if (result)
                {
                     return Redirect(UrlResolver.Current.GetUrl(ContentReference.StartPage));
                }
            }
            ModelState.AddModelError("LoginError", "Login failed");
            return View(Global.CustomLoginView, model);
        }
    }
}

System.InvalidOperationException: An error occurred when trying to create a controller of type 'AVG.Web.Controllers.Pages.StandardPageControlle

$
0
0

Hi,

I have been implemented Episerver Insight like bellow.

It very strange, I don't know why i can't get instance of ICmsTrackingService even i already registered it.

Can anybody show me clue?

System.InvalidOperationException: An error occurred when trying to create a controller of type 'AVG.Web.Controllers.Pages.StandardPageController'. Make sure that the controller has a parameterless public constructor. ---> System.MissingMethodException: No parameterless constructor defined for this object.
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.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at System.Web.Mvc.DefaultControllerFactory.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType)
--- End of inner exception stack trace ---
at System.Web.Mvc.DefaultControllerFactory.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType)
at System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory)
at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.<>c__DisplayClass285_0.<ExecuteStepImpl>b__0()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
System.InvalidOperationException: An error occurred when trying to create a controller of type 'AVG.Web.Controllers.Pages.StandardPageController'. Make sure that the controller has a parameterless public constructor. ---> System.MissingMethodException: No parameterless constructor defined for this object.
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.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at System.Web.Mvc.DefaultControllerFactory.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType)
--- End of inner exception stack trace ---
at System.Web.Mvc.DefaultControllerFactory.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType)
at System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory)
at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.<>c__DisplayClass285_0.<ExecuteStepImpl>b__0()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
2020-08-13 14:48:27,359 [107] ERROR AVG.Web.EPiServerApplication: No parameterless constructor defined for this object.

 public interface ICmsTrackingService
    {
        Task TrackPage(PageData pageData, HttpContextBase httpContextBase);
    }
public class CmsTrackingService : ICmsTrackingService
    {
        private readonly ITrackingService _trackingService;
        private readonly IContextModeResolver _contextModeResolver;
        private readonly ISiteDefinitionResolver _siteDefinitionResolver;
        private readonly IContentLoader _contentLoader;
        private readonly ILogger _logger = LogManager.GetLogger(typeof(CmsTrackingService));
        public CmsTrackingService(
            ITrackingService trackingService,
            IContextModeResolver contextModeResolver,
            ISiteDefinitionResolver siteDefinitionResolver,
            IContentLoader contentLoader) {
            _trackingService = trackingService;
            _contextModeResolver = contextModeResolver;
            _siteDefinitionResolver = siteDefinitionResolver;
            _contentLoader = contentLoader;
        }
public virtual async Task TrackPage(PageData pageData, HttpContextBase httpContextBase){
...
}
}
context.Services.AddTransient<ICmsTrackingService, CmsTrackingService>();
  public class StandardPageController : PageControllerBase<StandardPage>
    {
        private readonly ICmsTrackingService _cmsTrackingService;
        public StandardPageController(ICmsTrackingService cmsTrackingService)
        {
            _cmsTrackingService = cmsTrackingService;
        }
}
}

Restrict colors in Tinymce font color plugin

$
0
0

Hi,

So i have done below code to display toolbars and plugins in tinymce editor, recently i added font color and font background color toolbar as well and i can see it in editor but i want to restrict the colors which come under that.

public void ConfigureContainer(ServiceConfigurationContext context)
{
               context.Services.Configure<TinyMceConfiguration>(config =>
               {

                      var DefaultTinyMceSettings = config.Default().AddPlugin(ToolbarButtons.EpiLink + "" + ToolbarButtons.Anchor + "" + ToolbarButtons.Image + "textcolor colorpicker")
                      .Toolbar(ToolbarButtons.EpiLink + "" + ToolbarButtons.Anchor + "" + ToolbarButtons.Image                                             , "forecolor backcolor");

               }

}

I saw on Tinymce documentation https://www.tiny.cloud/docs/configure/content-appearance/#custom_colors and it says it has color_map property to restrict the colors but im not sure how we will do that here as there code is based on js.


filter search and search results based on url

$
0
0

I have a site called abcd.com. in this site i have 2 minimal subsites in it (A and B).

search page exists in parent site that is abcd.com only.

when i click any link inside A or B site then my URL is abcd.com/A or abcd.com/B.

after navigating to A site when i search , search results should display within A or B only.

if my URL in browser abcd.com/A or abcd.com/B site and if am searching then serach results should be display from abcd.com/A or abcd.com/B only not inlcude all.

How to warmp the application into DXP whenever deployed new build

$
0
0

Hi Team,

I am currently facing performance issues for first request whenever latest deployed or Web app restarted in DXP.

I am facing performance issue with MVC partial views as well. So always first request is taking min 5 to 10 seconds to load. This is for every partial view request.(i.e. If we have 10 ajax calls then each call first requet taking time).

What is the best way to warmup the application to avoid performance issues with first request. Can someone provide any steps to do it?

Does my partial views issues will also resolve? If we configure warmup steps.

Thanks,

Suresh B

Logout not working, .AspNet.ApplicationCookie is not being deleted

$
0
0

When I click on logout I am taken to util/logout.aspx however when I navigate back to the main page of our website I am still logged in and can access the CMS backend.

From what I can tell the cookie .AspNet.ApplicationCookie is not being deleted.

In our PageControllerBase.cs we have:

        public ActionResult Logout()
        {
            UISignInManager.Service.SignOut();
            return RedirectToAction("Index");
        }

Which when I compare it to the Alloy EpiServer demo appears to be identitical.

Where else do I need to look to check what could be the issue?

In case it is also relevant, we are using a custom login page:

namespace Project.Site.Controllers
{
    public class CustomLoginController : Controller
    {
        private UISignInManager uiSignInManager = ServiceLocator.Current.GetInstance<UISignInManager>();
        private UIUserProvider uiUserProvider = ServiceLocator.Current.GetInstance<UIUserProvider>();
        public ActionResult Index()
        {
            return View(Global.CustomLoginView);
        }
        [HttpPost]
        [AllowAnonymous]
        [ValidateAntiForgeryToken]
        [ValidateInput(false)]
        public ActionResult LocalLogin(CustomLoginViewModel model)
        {
            if (ModelState.IsValid)
            {
                bool result = uiSignInManager.SignIn(uiUserProvider.Name, model.Username, model.Password);
                if (result)
                {
                     return Redirect(UrlResolver.Current.GetUrl(ContentReference.StartPage));
                }
            }
            ModelState.AddModelError("LoginError", "Login failed");
            return View(Global.CustomLoginView, model);
        }
    }
}

Page Permissions Redirecting to CMS Log in

$
0
0

Upgraded Epi to use Identity/Owin and its been pretty smooth sailing.

One issue we've come across is if we manage page visibility and set specific groups to view once a user has registered and logged (not cms), if you have the page link but aren't part of that Group you get redirected to the Cms login page.

From this post:

https://world.episerver.com/forum/developer-forum/-Episerver-75-CMS/Thread-Container/2014/3/Members-area-restrict-pages/

It suggests changing the forms url to the members page but the knock on effect would be admin/cms users if they try and go to /episerver (or whatever is configured) it would redirect to our customer login and instead will have to go directly to /util/login.aspx

Is there a best of both worlds here where we can keep the cms users too /episerver (or whatever is configured) but also make sure customers are redirected correctly.

I was thinking that maybe some type of Owin configuration could handle it and the routing, but i haven't come across anything like that

How to exclude contentlink id in search result

$
0
0

Hi guys, 

I have a problem when a customer search a product code(Article number) e.g. 1512 in Find.

It included a product which have ContentLink ID 1512 (product code 70405) in search result.

How can I exclude the contentlink id in the search result?

I have the following code:

multiSearch = searchClient.Search<ContentData>()
.For(query)
.FilterByExactTypes(new[] { typeof(Article), typeof(Category), typeof(StandardPage) })
.FilterForVisitor(currentLanguage)
.FilterMarket(new IMarket[] {currentMarket})
.Skip(skip).Take(itemsPerPage).Track().GetContentResult();

Thanks, 

ChiChing

Viewing all 6894 articles
Browse latest View live