Visualizzazione dei risultati da 1 a 10 su 14

Visualizzazione discussione

  1. #5
    Moderatore di ASP.net L'avatar di djciko
    Registrato dal
    Nov 2002
    Messaggi
    6,887
    si, intendevo questo, anche se il global.asax ha un aspetto diverso ora, mi pare.

    Come dicevo, la cosa che chiedevi è dovuta al fatto che alcuni codici di errore sono gestiti dal web.config/framework, altri (non nativi di ASP.Net), dall'application server, IIS.

    Come spiega appunto un articolo sulla configurazione per il redirect alle pagine di errore (https://docs.microsoft.com/en-us/asp...-error-page-cs)


    <customErrors mode="RemoteOnly" defaultRedirect="~/ErrorPages/Oops.aspx"><error statusCode="404" redirect="~/ErrorPages/404.aspx" /></customErrors>

    The custom error page is only displayed when a request is made to a resource handled by the ASP.NET engine. As we discussed in the Core Differences Between IIS and the ASP.NET Development Server tutorial, the web server may handle certain requests itself. By default, the IIS web server processes requests for static content like images and HTML files without invoking the ASP.NET engine. Consequently, if the user requests a non-existent image file they will get back IIS's default 404 error message rather than ASP.NET's configured error page.
    Ultima modifica di djciko; 04-05-2019 a 15:42

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.