为什么在Web.config中将subStatusCode设置为-1?

Dev*_*ave 17 .net web-config http-status-codes

如果这是显而易见的道歉,但我已经四处寻找并且无法找到答案.

在一个.net Web.config文件中,有人可以告诉我什么设置subStatusCode为-1?

<httpErrors errorMode="Custom" existingResponse="Replace">
      <clear />
      <remove statusCode="404" subStatusCode="-1" />
      <error statusCode="404" prefixLanguageFilePath="" path="/Error.aspx" responseMode="ExecuteURL" />
</httpErrors>
Run Code Online (Sandbox Code Playgroud)

我的猜测是它意味着所有'子'代码,404.1,404.2等等?

cas*_*One 10

-1是subStatusCodeIIS中的默认值.

也就是说,你在这里删除元素,所以它只是重述了明显的(删除所有先前的条目statusCode).

在这种情况下(使用remove元素)不需要它.