I need to make simple 404 error pages which may have some server side code. for that i have made web.config file as below
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<defaultDocument>
<files>
<add value="index.asp" />
</files>
</defaultDocument>
<httpErrors errorMode="Custom" existingResponse="Replace" defaultResponseMode="ExecuteURL">
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="404.asp" />
</httpErrors>
</system.webServer>
</configuration>
and 404.asp page has following code
404 page
<%=date%>
when i request non existing page then it shows output as
404 page
<%=date%>
the asp code is sent to browser directly without executing on server side
how can i avoid this