Error 404 Error starting ServiceStack on IIS8

My ServiceStack service works fine in IIS Express (VS 2012) and when deployed to Windows Azure, but it does not work in IIS 8 in window 8.

I get a 404 Not Found Error . My web.config has both sections specific to IIS Express and the web server.

 <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.web> <compilation debug="true" targetFramework="4.5"> <assemblies> <add assembly="System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> </assemblies> <buildProviders> <add extension=".cshtml" type="ServiceStack.Razor.CSharpRazorBuildProvider, ServiceStack.Razor" /> </buildProviders> </compilation> <httpRuntime targetFramework="4.5" /> </system.web> <system.webServer> <validation validateIntegratedModeConfiguration="false" /> <handlers> <add path="*" name="ServiceStack.Factory" type="ServiceStack.WebHost.Endpoints.ServiceStackHttpHandlerFactory, ServiceStack" verb="*" preCondition="integratedMode" resourceType="Unspecified" allowPathInfo="true" /> </handlers> </system.webServer> </configuration> 

Decision:

Just found out, through further research, that this solved my problem:

  • I turned on the application pool in integrated mode.
  • I added the following to web.config :

     <system.webServer> <modules runAllManagedModulesForAllRequests="true"/> </system.webServer> 
+4
source share
1 answer

Repeating the solution as an answer to understand what the problem is:


after doing a few more searches, I found 2 suggestions that solved my problem:

  • application pool enabled in integrated mode
  • Added the following to web.config

      <system.webServer> <modules runAllManagedModulesForAllRequests="true"/> 

+2
source

Source: https://habr.com/ru/post/1480573/


All Articles