title: Custom Authentication Servicestack services running on IIS 8 return 404 for non authenticated methods
body: <p>I am running my ServiceStack services web project (a non MVC project) on IIS 8, Integrated Pipeline (Framework 4.5).</p>
  
  <p>Now if my service is not yet authenticated it returns 404. If it is authenticated it runs normal. 
  I would have expected a 401. I also tested it with IIS Express and same code is returned.</p>
  
  <p>Request/Response DTO's:</p>
  
  <pre><code>[Route("/common/init/{token}/{timestamp}")]
  public class InitRequest
  {
      public string Token { get; set; }
      public string TimeStamp { get; set; } //This also prevents an unwanted IE request caching
  }
  
  public class InitResponse
  {
  }
  </code></pre>
  
  <p>Service:</p>
  
  <pre><code>public class CommonService : Service
  {
  
      [Authenticate]
      public object Get(InitRequest request)
      {
          ...
      }
   }
  </code></pre>
  
  <p>Web.config:</p>
  
  <pre><code>&lt;system.web&gt;
      &lt;compilation debug="true" targetFramework="4.5" /&gt;
      &lt;httpRuntime targetFramework="4.5" /&gt;
  &lt;/system.web&gt;
  &lt;system.webServer&gt;
      &lt;modules runAllManagedModulesForAllRequests="true"/&gt;
      &lt;validation validateIntegratedModeConfiguration="false" /&gt;
      &lt;handlers&gt;
          &lt;add path="*" name="ServiceStack.Factory" type="ServiceStack.HttpHandlerFactory, ServiceStack" verb="*" preCondition="integratedMode" resourceType="Unspecified" allowPathInfo="true" /&gt;
      &lt;/handlers&gt;
  &lt;/system.webServer&gt;  
  </code></pre>
  
  <p>By the way, I am using custom authentication, code:</p>
  
  <pre><code>public class CustomAuthProvider : AuthProvider
  {
      public CustomAuthProvider()
      {
          this.Provider = "Custom AuthProvider";
      }
  
      public override bool IsAuthorized(IAuthSession session, IAuthTokens tokens, Authenticate request = null)
      {
          return session.IsAuthenticated;
      }
  
      public override object Authenticate(IServiceBase authService, IAuthSession session, Authenticate request)
      {
          throw new NotImplementedException();
      }
  }
  </code></pre>
  
  <p>Request Header:</p>
  
  <pre><code>GET /GlonecoServices/login?      redirect=http%3a%2f%2flocalhost%2fGlonecoServices%2fcommon%2finit%2fsometoken%2f123456789 HTTP/1.1
  User-Agent: Fiddler
  Host: localhost
  </code></pre>
  
  <p>Response Header:</p>
  
  <pre><code>HTTP/1.1 404 Not Found
  Cache-Control: private
  Content-Type: text/plain; charset=utf-8
  Vary: Accept
  Server: Microsoft-IIS/8.5
  X-Powered-By: ServiceStack/4,035 Win32NT/.NET
  X-AspNet-Version: 4.0.30319
  X-Powered-By: ASP.NET
  Date: Wed, 14 Jan 2015 18:22:20 GMT
  Content-Length: 328
  </code></pre>