Twenty C# Questions Explained

​Are you a developer with coding questions? Many new and experienced developers visit Stackoverflow.com to find solutions and to help others resolve their computing questions and issues. This training session focuses on 20 of the top questions surrounding the C# language, based on number of views and votes on stackoverflow. Watch this session, and get your questions answered.

via Twenty C# Questions Explained.

EPiServer Commerce R1 – Trigger Lucene Searching and Indexing

If you want to use certain parts of the Commerce Manager (e.g. Marketing -> Promotion -> “Order: Buy X, get N quantity of Y at a discount”. -> Catalog entries picker, the Commerce default Lucene search indexer must be active.

Else you get this error inside the picker window:

System.IO.FileNotFoundException: no segments* file found in Lucene.Net.Store.FSDirectory

The searchindex creation can be triggered manually through Manager -> Administration -> System settings -> Search Index.

Scheduled jobs should be available in CMS but here is how to trigger the indexing through code:

via Searching and Indexing.

Build index command

SearchManager searchManager = new SearchManager(applicationName);

searchManager.BuildIndex(false);

Allan Jardine | Reflections | Visual Event

Events in Javascript are often seen as a bit of an enigma. This is odd given that Javascript is very much an event driven language, but it is typically down to their complex nature and difficulty to debug. To this end I’ve created Visual Event to help track events which are subscribed to DOM nodes.

Allan Jardine | Reflections | Visual Event.

Set EPiServer Commerce 1 caching on nodes/entries

<?xml version="1.0"?>
<Catalog autoConfigure="true">
  <Connection connectionStringName="EcfSqlConnection" />
  <Cache enabled="true" collectionTimeout="0:1:0" entryTimeout="0:1:0" nodeTimeout="0:1:0" schemaTimeout="0:2:0" />

entries and nodes cache timeout is set to 1 minute.

Changes in Commerce should affect the “productpage” in the website immediately but  sometimes the cache invalidation dont work. The above setting is ultimately the cache timeout then.