2017-11-26 1 views
0

확인 .... 나는MVC 5 웹 구성

내 최신 문제는 ... 잠시 동안 출판이 페이지를 얻으려고 노력되었습니다

오류 섹션은 한 번만 설정 파일에 따라 표시되어야합니다. 이 ...이 라인은 다음, 자동으로 오류를 게시에 추가 erroring되는 경우

<appSettings> 
    <add key="webpages:Version" value="3.0.0.0" /> 
    <add key="webpages:Enabled" value="false" /> 
    <add key="ClientValidationEnabled" value="true" /> 
    <add key="UnobtrusiveJavaScriptEnabled" value="true" /> 
    </appSettings> 
    <system.web> 
    <customErrors mode="Off"></customErrors> 
    <compilation /> 
    <compilation targetFramework="4.5.2" /> 
    <httpRuntime targetFramework="4.5.2" /> 
    <httpModules> 
     <add name="ApplicationInsightsWebTracking" 
     type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, 
     Microsoft.AI.Web" /> 
    </httpModules> 
    </system.web> 
    <system.webServer> 
    <modules> 
     <remove name="FormsAuthentication" /> 
     <remove name="ApplicationInsightsWebTracking" /> 
     <add name="ApplicationInsightsWebTracking" 
     type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, 
     Microsoft.AI.Web" preCondition="managedHandler" /> 
    </modules> 
    <httpErrors errorMode="Detailed" /> 
    <asp scriptErrorSentToBrowser="true" /> 
    <validation validateIntegratedModeConfiguration="false" /> 
    <directoryBrowse enabled="true" /> 
    <modules runAllManagedModulesForAllRequests="true" /> 
    </system.webServer> 

은 다음과 같습니다 도움말 항목 여기

를 참조하면 Web.config의입니다. 어떤 아이디어?

마지막으로 서버 오류를 브라우저에 게시하여 문제를 해결할 수 있습니다.

+0

을 참조하시기 바랍니다 조금 <편집 /> <편집 targetFramework = "4.5.2"/> 어디 오류가 발생합니다 –

+0

관련 정보 (질문이 아님)로 질문 편집 –

답변

0
<httpErrors errorMode="Custom" existingResponse="Replace"> 
      <clear /> 
      <remove statusCode="403" /> 
      <remove statusCode="404" /> 
      <remove statusCode="500" /> 
      <error statusCode="403" path="/Error/Unauthorized" responseMode="ExecuteURL" /> 
      <error statusCode="404" path="/Error/NotFound" responseMode="ExecuteURL" /> 
      <error statusCode="500" path="/Error/Error" responseMode="ExecuteURL" /> 
</httpErrors> 

다음은 httpErrors를 설정하는 예입니다.

자세한 정보는 부재 here