Missing errors (all 404s) can be easily caught into your aspx file by doing
the following:
For this example, assume your web app is called MyApp and is located in
/inetpub/wwwroot/myapp
and your 404 page is called 404.aspx located in /inetpub/wwwroot/myapp
Your web.config stays as you have it, looks good. This will catch requests
like
http://www.myserver.com/myapp/not-here.aspx or any aspx or ascx request
To intercept the missing files, goto the web server and bring up the
properties of the web app (virtual folder). Under the "Custom Errors" tab
select "404" and pick up your file /inetpub/wwwroot/myapp/404.aspx
Now that instructs IIS web server process to use your 404.aspx page for any
404 error... so missing html requests can get picked up for non asp.net
requests (and directs them to your asp.net page!)
There is probably a way to automate this in a setup file. If you don't have
control of the web server you are on, I'm not sure what to do except bribe
the administrators. Good luck
Jovo Filips
"Bubu" <qd****@yahoo.co.uk> wrote in message
news:a8*************************@posting.google.co m...
Hello this is robert,
I need some suggestion,
I have a website, hosted in windows 2003 server,shared hosting.
I would like to have a custom 404 error page, for missing files.
In the help file of my internet provider they said to do it in .NET,
like this
web.config
<configuration>
<system.web>
<customErrors mode="On" defaultRedirect="error.aspx">
<error statusCode="404" redirect="404.aspx" />
</customErrors>
</system.web>
</configuration>
but i would like to use it also for
missing .html
missing directories
missing .asp
Any Help ?
Thanks.
Robert.