Not sure how far you are down the development route for this module...
On the subject of using a 404 page solution, my gut feel is that this may work but it is not an elegant solution.
I have worked on a number of systems that deliver documents to users of an ASP.Net page. These documents are dynamically created by external systems, so there is no physical location to direct the user to.
This is resolved by using the code below, which basically returns binary data to the web page, which in this case will display a PDF, however it can be setup to return any binary datatype, or known file types.
Response.AddHeader("Content-disposition", "attachment;filename=Output.pdf")Response.ContentType = "application/pdf"
Response.BinaryWrite(oStream.ToArray())
Response.End()
The only down side to this implementation is that the requested document would have to be loaded into memory before being returned to the client. This could have an impact on memory if the file size is large.
Something else to consider is how do other sites do it? For example if I buy some software from a site, I’m sure they don’t just redirect to a physical location on the server where the download file lives.