asp.net - how to remove version information from server error "the resource cannot be found" -
while browsing page, getting error :
server error in '/' application.
the resource cannot found.
description: http 404. resource looking (or 1 of dependencies) have been removed, had name changed, or temporarily unavailable. please review following url , make sure spelled correctly.
requested url: /webresource.axd
version information: microsoft .net framework version:4.0; asp.net version:4.0.33
the error expected , need way hide/remove version information.!? if there any...
create custom page want users see , in web.config
file have like
<system.web> <customerrors mode="remoteonly" defaultredirect="404.aspx" redirectmode="responseredirect"> <error statuscode="404" redirect="404.aspx" /> ... </customerrors> </system.web>
there 3 different mode on
, off
, remoteonly
on - specifies custom errors enabled. if no defaultredirect attribute specified, users see generic error. custom errors shown remote clients , local host.
off - specifies custom errors disabled. detailed asp.net errors shown remote clients , local host.
remoteonly - specifies custom errors shown remote clients, , asp.net errors shown local host. default value.
the default remoteonly
further reading here. might want @ answer if want know difference between customerrors
, httperrors
Comments
Post a Comment