IIS 8.5 Basic authentication not working – internal error 500.19

http-basic-authenticationiisweb-server

I have Basic Auth enabled for the specific folder and anonymous disabled. I also have created users, however I get a "The page cannot be displayed because an internal server error has occurred." message on the browser. Here is the log from the failed request tracing. I have been looking at this for hours but not been able to solve it.

UPDATE: The same error triggers when I access any non existing page, for example http://144.144.144.144/asdasoidjasoida

<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type='text/xsl' href='freb.xsl'?>
<!-- saved from url=(0014)about:internet -->
<failedRequest url="http://144.144.144.144:80/admin/"
               siteId="1"
               appPoolId="DefaultAppPool"
               processId="820"
               verb="GET"
               authenticationType="NOT_AVAILABLE"               activityId="{8000000E-0002-FF00-B63F-84710C7967BB}"
               failureReason="STATUS_CODE"
               statusCode="500.19"
               triggerStatusCode="500.19"
               timeTaken="0"
               xmlns:freb="http://schemas.microsoft.com/win/2006/06/iis/freb"
               >
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
 <System>
  <Provider Name="WWW Server" Guid="{3A2A4E84-4C21-4981-AE10-3FDA0D9B0F83}"/>
  <EventID>0</EventID>
  <Version>1</Version>
  <Level>0</Level>
  <Opcode>1</Opcode>
  <Keywords>0x0</Keywords>
  <TimeCreated SystemTime="2016-09-29T15:24:04.662Z"/>
  <Correlation ActivityID="{8000000E-0002-FF00-B63F-84710C7967BB}"/>
  <Execution ProcessID="820" ThreadID="3756"/>
  <Computer>OWNEROR-9DTV6I9</Computer>
 </System>
 <EventData>
  <Data Name="ContextId">{8000000E-0002-FF00-B63F-84710C7967BB}</Data>
  <Data Name="SiteId">1</Data>
  <Data Name="AppPoolId">DefaultAppPool</Data>
  <Data Name="ConnId">1610612749</Data>
  <Data Name="RawConnId">0</Data>
  <Data Name="RequestURL">http://144.144.144.144:80/admin/</Data>
  <Data Name="RequestVerb">GET</Data>
 </EventData>
 <RenderingInfo Culture="el-GR">
  <Opcode>GENERAL_REQUEST_START</Opcode>
 </RenderingInfo>
 <ExtendedTracingInfo xmlns="http://schemas.microsoft.com/win/2004/08/events/trace">
  <EventGuid>{D42CF7EF-DE92-473E-8B6C-621EA663113A}</EventGuid>
 </ExtendedTracingInfo>
</Event>
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
 <System>
  <Provider Name="WWW Server" Guid="{3A2A4E84-4C21-4981-AE10-3FDA0D9B0F83}"/>
  <EventID>0</EventID>
  <Version>1</Version>
  <Level>0</Level>
  <Opcode>33</Opcode>
  <Keywords>0x0</Keywords>
  <TimeCreated SystemTime="2016-09-29T15:24:04.662Z"/>
  <Correlation ActivityID="{8000000E-0002-FF00-B63F-84710C7967BB}"/>
  <Execution ProcessID="820" ThreadID="3756"/>
  <Computer>OWNEROR-9DTV6I9</Computer>
 </System>
 <EventData>
  <Data Name="ContextId">{8000000E-0002-FF00-B63F-84710C7967BB}</Data>
  <Data Name="HttpStatus">500</Data>
  <Data Name="HttpSubStatus">19</Data>
  <Data Name="FileNameOrURL"></Data>
 </EventData>
 <RenderingInfo Culture="el-GR">
  <Opcode>GENERAL_SEND_CUSTOM_ERROR</Opcode>
 </RenderingInfo>
 <ExtendedTracingInfo xmlns="http://schemas.microsoft.com/win/2004/08/events/trace">
  <EventGuid>{D42CF7EF-DE92-473E-8B6C-621EA663113A}</EventGuid>
 </ExtendedTracingInfo>
</Event>
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
 <System>
  <Provider Name="WWW Server" Guid="{3A2A4E84-4C21-4981-AE10-3FDA0D9B0F83}"/>
  <EventID>0</EventID>
  <Version>1</Version>
  <Level>0</Level>
  <Opcode>2</Opcode>
  <Keywords>0x0</Keywords>
  <TimeCreated SystemTime="2016-09-29T15:24:04.662Z"/>
  <Correlation ActivityID="{8000000E-0002-FF00-B63F-84710C7967BB}"/>
  <Execution ProcessID="820" ThreadID="3756"/>
  <Computer>OWNEROR-9DTV6I9</Computer>
 </System>
 <EventData>
  <Data Name="ContextId">{8000000E-0002-FF00-B63F-84710C7967BB}</Data>
  <Data Name="BytesSent">222</Data>
  <Data Name="BytesReceived">466</Data>
  <Data Name="HttpStatus">500</Data>
  <Data Name="HttpSubStatus">19</Data>
 </EventData>
 <RenderingInfo Culture="el-GR">
  <Opcode>GENERAL_REQUEST_END</Opcode>
 </RenderingInfo>
 <ExtendedTracingInfo xmlns="http://schemas.microsoft.com/win/2004/08/events/trace">
  <EventGuid>{D42CF7EF-DE92-473E-8B6C-621EA663113A}</EventGuid>
 </ExtendedTracingInfo>
</Event>
</failedRequest>

The server specs are: 64bit Windows 2012 R2 with IIS 8.5. Does someone know what is going on ? Thank you in advance.

Best Answer

it seems the following lines in web.config caused the trouble. still don't know why.

    <httpErrors errorMode="DetailedLocalOnly">
        <remove statusCode="404" subStatusCode="-1" />
        <error statusCode="404" prefixLanguageFilePath="" path="C:\inetpub\wwwroot\notfound.htm" responseMode="File" />
    </httpErrors>
Related Topic