Views: 3403
Number of votes: 3
Average rating:

When EPiServer.Search dosen't work

I work locally and move the site to a test server, and the search didn't work.
The first problem was the http://IndexingService/IndexingService.svc gave an 500 error since it didn't find the handler for it. That was easy resolved by adding svg-Itegrated-4.0 handler.

  <location path="IndexingService/IndexingService.svc">
      <httpRuntime maxQueryStringLength="65536" />

        <add name="svc-Integrated-4.0" path="*.svc" verb="*" type="System.ServiceModel.Activation.ServiceHttpHandlerFactory, System.ServiceModel.Activation, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="integratedMode,runtimeVersionv4.0" />

          <requestLimits maxQueryString="65536" />

But the problem was there still. I got no hits from the search. I thought it maybe was something that would show in the log, but the log didn't add any lines. That was solved by editing the EPiServerLog.config and set the threshold for the appender to All since it by default is set to Error.

    <appender name="errorFileLogAppender" type="log4net.Appender.RollingFileAppender" >
        <!-- Consider moving the log files to a location outside the web application -->
        <file value="App_Data\EPiServerErrors2.log" />
        <encoding value="utf-8" />
        <staticLogFileName value="true"/>
        <datePattern value=".yyyyMMdd.'log'" />
        <rollingStyle value="Date" />
        <threshold value="All" />
        <lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
        <appendToFile value="true" />
        <layout type="log4net.Layout.PatternLayout">
            <conversionPattern value="%date [%thread] %level %logger: %message%n" />
    <appender name="outputDebugStringAppender" type="log4net.Appender.OutputDebugStringAppender" >
        <layout type="log4net.Layout.PatternLayout">
            <conversionPattern value="[%thread] %level %logger: %message%n" />
  <!-- Log page publish to find editor related errors. -->
  <logger name="EPiServer.Search.IndexingService">
    <level value="All" />

        <level value="Error" />
        <appender-ref ref="errorFileLogAppender" /> 

But my zero hits didn't show in the log, or it showed that the index was responding, but gave 0 hits. Then it struck me that to get the index to work I need to copy the AppData/Index files to the new server. And it worked. So mental not to self, when deploying a local site to a test server copy the AppData/Index files also, or reindex the site again

Feb 09, 2016

( 2/9/2016 4:25:49 PM)

Forgetting to map up domain name in host file is another got ya. 

Ip filter that disallow localhost is a third I've bashed my head against  :)

Please login to comment.