This is a bit tricky and I'd be glad if you guys could give me some pointers on this one.
Here is what I want to do:
A user tries to access myapp.com/data/123456.mp3
test.mp3 doesn't exist
The system sends the user to myapp.com/data/error.apsx?file=123456.mp3
I need this in order to handle the way a large system is supposed to serve mp3 files.
If a user tries to access myapp.com/otherFolder/notHere.whatever, the system returns the standard 404 error normally.
I know there are ways to specify that in IIS, but I'd love it if there was something I could do programmatically or just withing my .net project.
edit:
I've created a web.config file in myapp.com/data/
<?xml version="1.0"?>
<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="/data/mp3/full/serveMp3.aspx"/>
</system.web>
</configuration>
This doesn't seem to be working.