Cross cutting concerns should be handled in an unobtrusive way, i.e. implemented in a way they don’t require any modifications to your original features. One way to achieve this is by using Aspect Oriented Programming, more specifically using Castle Dynamic Proxies to intercept method calls at runtime with StructureMap. The code examples below were implemented in an EPiServer Alloy MVC site. In this example we’re going to add MiniProfiler and measure how long each method takes to run.
A quick note to self: To debug EPiServer Search indexing, the below should be added to EPiServerlog.config: <!--EPiServer.Search.IndexingService.IndexingService--> <logger name="IndexingService"> <level value="All" /> </logger> <logger name="EPiServer.Search"> <level value="All" /> </logger> <!-- Reduce amount of debug logging --> <logger name="EPiServer.Core.ContentProvider" additivity="false"> <level value="Debug" /> </logger> <logger name="EPiServer.Data.Dynamic.Providers.DbDataStoreProvider" additivity="false"> <level value="Error" /> </logger> <logger name="EPiServer.Data.Providers.SqlDatabaseHandler" additivity="false"> <level value="Error" /> </logger> <logger name="EPiServer.Data.Providers.ConnectionContext" additivity="false"> <level value="Error" /> </logger>
The most commonly used workflow in EPiServer is the Sequential approval workflow. It is primarily used to assign tasks and send notifications through the various stages of page publication. Troubleshooting workflows is no easy task. You typically have to enable Windows Workflow Foundation diagnostics and examine the logs. You can achieve this by adding the following element to your web.config: <system.diagnostics> <switches> <add name="System.Workflow.Runtime" value="All" /> <add name="System.Workflow.Runtime.Hosting" value="All" /> <add name="
Revealing specific details about the operating system and the platform you are using to host your website can make it more vulnerable. While knowing that you’re using Windows/Linux as the operating system or IIS/Apache/nginx as your application server won’t make it less secure, it does help an attacker tailor his attack vector against your system. This type of vulnerability is detailed in the Owasp top 10: A5. Revealing information about your system may help an attacker.
In this scenario we have an application that performs slowly and has high CPU usage. Typically pages take longer to load and sometimes might timeout. Start DebugDiag Collector and select “Performance” Select the second option to monitor the HTTP response times of your website Add the urls to the pages that are performing slowly to monitor their response times Enter the page urls and set the timeout after which the rule is triggered.