We noticed that the edit mode EPiServer search did not function properly for a new website being developed for a client. What caused the issue was mainly two things; the EPiServer search not being set up properly (causing the message Content not found), and some missing handler mappings in the IIS making us only being able to search based on PageIds. Here is a short description on how to set this up afterwards, if you did not do it while you installed the EPiServer site.
EPiServer Search in Edit mode always return Content not found
The reason for this is that you have not yet set up EPiServer Search for your website. You can either do this via EPiServer’s Deployment Center, or through the EPiServer NuGet package. I did this from the NuGet feed. Remember that you will need to update your configuration transforms in order to maintain changes done by the package install. The only config file affected by this is web.config; additions and alterations summarized below.
<configuration> <configSections> <section name="episerver.search.indexingservice" type="EPiServer.Search.IndexingService .Configuration.IndexingServiceSection, EPiServer.Search.IndexingService" />
<dependentAssembly> <assemblyIdentity name="EPiServer.Search.IndexingService" publicKeyToken="8fe83dea738b45b7" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-18.104.22.168" newVersion="22.214.171.124" /> </dependentAssembly>
<episerver.search active="true"> <namedIndexingServices defaultService="serviceName"> <services> <add name="serviceName" baseUri="http://localhost:2047/IndexingService/IndexingService.svc" accessKey="local" /> </services> </namedIndexingServices> <searchResultFilter defaultInclude="true"> <providers /> </searchResultFilter> </episerver.search>
<webHttpBinding> <binding name="IndexingServiceCustomBinding" maxBufferPoolSize="1073741824" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647"> <readerQuotas maxStringContentLength="10000000" /> </binding> </webHttpBinding> </bindings> </system.serviceModel>
<episerver.search.indexingservice> <clients> <add name="local" description="local" allowLocal="true" readonly="false" /> </clients> <namedIndexes defaultIndex="default"> <indexes> <add name="default" directoryPath="[appDataPath]\Index" readonly="false" /> </indexes> </namedIndexes> </episerver.search.indexingservice>
<location path="IndexingService/IndexingService.svc"> <system.web> <httpRuntime maxQueryStringLength="65536" /> </system.web> <system.webServer> <security> <requestFiltering> <requestLimits maxQueryString="65536" /> </requestFiltering> </security> </system.webServer> </location> </configuration>
EPiServer Search in Edit mode only searches on page ids
If you find that you are only able to search for pages using Page Ids in EPiServer’s edit mode search field, you might want to try browsing to the service URL locally on the server. Using the URL from the example configuration above, surfing to http://localhost:2047/IndexingService/IndexingService.svc/update/?accesskey=local should, if everything was set up properly, yield a service response saying Method not allowed as in the image below.
However, if you’re having the mentioned problem you are likely to get a 404 Not Found page instead. This may be due to missing Handler Mappings in the IIS. To check this, left click on your website in the IIS, and select Handler Mappings. Scroll down and see if you can find any with the path *.svc
If you don’t, you will need to open up the Control Panel.
Above is a screenshot of my local developer machine. Go to Programs and Features and click the Turn Windows features on or off link. Here you’ll have to tick the HTTP Activation checkbox as in the image. The same thing on our Windows Server environment below.