c# - Is it possible to remove information from Server Error pages in ASP.NET 4.0? -


in order better hide information users, i'm trying remove version information section standard asp.net error screen.

custom errors on, but, under circumstances, if manage error outside of control (server issues perhaps?) can through ysod. i've tried changing web.config include httpruntime setting can set enableversionheader false version information still comes through.

also, in application_presendrequestheaders method, i've tried remove "x-aspnet-version" response headers header doesn't exist due web.config setting.

is want possible within context or information exist?

to hide .net version information .net error pages (not generic iis errors 403, 404 etc.), use empty element without defaultredirect attribute:

<configuration>     <system.web>         <customerrors mode="remoteonly"/>     </system.web> </configuration> 

before:

before

after:

after

to remove x-aspnet-version http response header, set enableversionheader false on httpruntime element:

<configuration>     <system.web>         <httpruntime enableversionheader="false"/>     </system.web> </configuration> 

Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -