Wednesday, September 15, 2004 10:04 AM bart

Protecting .doc files in ASP.NET

This seems to be a problem for quite some people out there in the ASP.NET development galaxy. I've a rather large reply on the forums that covers this issue in deep detail and hopefully it can help others to sort this out: http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=692588#692612. To go short: ASP.NET does not know of the .doc extension (is not mapped inside IIS to the ASP.NET ISAPI), so you can't protect it directly in there without altering the configuration of the web server (IIS metabase related) or without using tricks (which I'm explaining in the post).Del.icio.us | Digg It | Technorati | Blinklist | Furl | reddit | DotNetKicks

Filed under:

Comments

# re: Protecting .doc files in ASP.NET

Wednesday, September 15, 2004 10:08 AM by bart

Just to illustrate how popular the question is actually. The next question I was answering was basically the same (but now for PDF file protection) :-): http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=692594#692617

# re: Protecting .doc files in ASP.NET

Monday, October 25, 2004 5:06 PM by bart

good thinking :-)

# re: Protecting .doc files in ASP.NET

Thursday, January 20, 2005 8:43 PM by bart

Bart,

Do you have more detailed code of rendering the file as Binary? We're having to use this protection scheme for files now, but I haven't had much experieince with ouputting to the binary stream in ASP.NET, and I've having a bear of a time getting this to wrok.

Thanks,
Dave