Try our conversational search powered by Generative AI!

IndexingService.svc on localhost returns 404 in EpiServer CMS version 8.0

Vote:
 

We are having difficulty with indexing in EpiServer CMS 8.0.  To triage this, I'd like to first get this running correctly on my local machine. But the indexing service URL returns a 404 message.  According to this post, which has some great ideas, I should see a “Service” page when navigating to the indexing service page.

http://world.episerver.com/blogs/Eric-Pettersson/Dates/2014/5/Are-you-also-having-trouble-with-EPiServer-Search-IndexingServicesvc-and-SSL/

My localhost page URL is below. When accessing this page, the browser returns a blank screen.  Investigating the console, it's returning a 404 not found error.

http://localhost:28022/IndexingService/IndexingService.svc

The namedIndexingServices node in web.config contains the above URL.

The above post also mentioned the “need to make sure we have the WCF installed correctly.”  According to Microsoft, WCF requires the installation of Windows Process Activation Service (WAS).  This is set up on my workstation.  All of the Windows Process Activation Service checkboxes are checked.

https://msdn.microsoft.com/en-us/library/bb675150(v=vs.110).aspx

Another post recommended adding a host entry for the local site, and that did not resolve the issue.  So I re-indexed locally, via:

http://localhost:28022/EPiServer/CMS/Admin/IndexContent.aspx

But that still results in a 404 error on the indexing service URL.  So I followed these steps:

  1. Run SystemServiceModelReg.exe, per the article recommendation, from this directory:  

    C:\Windows\Microsoft.NET\Framework64\v3.0\Windows Communication Foundation

  2. Index the site content via 

    http://localhost:28022/EPiServer/CMS/Admin/IndexContent.aspx

  3. Check the indexing service at 

    http://localhost:28022/IndexingService/IndexingService.svc

But it still fails with a 404 message on that service URL.

Here is the episerver.search node from Web.config on my solution.

  
    
      
        
      
    
    
      
    
  

I'm at a loss on how to proceed here.  Thanks for your help.

#151064
Jul 08, 2016 23:33
Vote:
 

Check that you have a handler for.svc files like

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

Also try turn off any custom 404s

#151066
Jul 09, 2016 10:38
Vote:
 

Thanks Daniel.  The config file has a handler for .svc files, identical to the line you posted.  Here is the full node structure where this resides. Other config settings are removed for clarity.  Is that location path of "EPiServer" the place where this node should reside?  The reason I ask is because the URL path used to access that doesn't contain the text "episerver".

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

I turned off custom errors by commenting out the lines shown below in the httpErrors node:

    <httpErrors errorMode="Custom" existingResponse="Replace">
      <!--<remove statusCode="404" subStatusCode="-1" />-->
      <remove statusCode="503" subStatusCode="-1" />
      <remove statusCode="500" subStatusCode="-1" />
      <!--<error statusCode="404" prefixLanguageFilePath="" path="/page-not-found" responseMode="ExecuteURL" />-->
      <error statusCode="503" prefixLanguageFilePath="" path="/maintenance" responseMode="ExecuteURL" />
      <error statusCode="500" prefixLanguageFilePath="" path="/maintenance" responseMode="ExecuteURL" />
    </httpErrors>

Now the http://localhost:28022/IndexingService/IndexingService.svc page displays the standard "404 - File or directory not found" message.

What else can I check or adjust?  Thank you.

#151094
Jul 11, 2016 19:18
Vote:
 

You actually need to do a bit more. There might be other *.svc handlers inherited from machine.config or other "parent" config files. Need to remove other handlers before adding your own:

<handlers>
    ....
   <remove name="svc-Integrated" />
   <remove name="svc-ISAPI-2.0" />
   <remove name="svc-ISAPI-2.0-64" />
   <remove name="svc-ISAPI-4.0_32bit" />
   <remove name="svc-ISAPI-4.0_64bit" />
   <remove name="svc-Integrated-4.0" />
    ...
    <add name="svc-Integrated-4.0" path="*.svc" verb="*" type="System.ServiceModel.Activation.ServiceHttpHandlerFactory, System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="integratedMode,runtimeVersionv4.0" />
#154964
Sep 05, 2016 12:16
Vote:
 

We had something like that as well.

Fixed it by adding a httperrors section for the indexing service location, setting it to the default, so your custom handling won't kick in.

<location path="IndexingService/IndexingService.svc">
    <system.web>
      <httpRuntime maxQueryStringLength="65536" />
    </system.web>
    <system.webServer>
      <security>
        <requestFiltering>
          <requestLimits maxQueryString="65536" />
        </requestFiltering>
      </security>
      <httpErrors errorMode="DetailedLocalOnly" existingResponse="Auto" />
    </system.webServer>
  </location>
#154966
Sep 05, 2016 13:52
Vote:
 

Yes, then you need to do fine-tuning for that location, add http errors override, increase/decrease request limits, etc.

#154967
Sep 05, 2016 14:56
Vote:
 

The section for that location is created when adding EPiserver.Search if I remember correctly, so you'd only have to add one line.

The problem with the service was/is, that it throws a 404 when called directly, by design. Which triggered the custom 404 handler, in our case the BVN one.

#154968
Sep 05, 2016 15:11
Vote:
 

..and my favorite...remember to upgrade your nuget package to latest version :)

I had an old version of the search package that didn't work with my upgraded Episerver CMS (on stage and production only). Upgrading to latest version of the nuget package helped. So that's something to start with before hacking a lot of configs like I did :)

#154969
Sep 05, 2016 15:40
Vote:
 

Thank you very much for clarifying this Jeroen, was pulling my hair out!

#185675
Nov 29, 2017 16:43
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.