Wednesday, September 12, 2018

swapping out what driver a PDF is associated with in IIS

I remember doing (managing) a project for Cenetron Diagnostics while at Headspring in which we had to conditionally show users PDFs if they were logged in but we didn't want users to be able to just send links to the PDFs to just anyone. A Ukrainian offshore team was working on this if I remember correctly. Their solution was to by default associate the .pdf extension with the wrong driver so that IIS couldn't really serve a PDF when one browsed to one. Then, if one was logged in and one was looking at the right stuff (I can't recall how one man's PDF was differentiated from all the others. Maybe we just gave them random GUIDs for names in hopes they'd be unguessable.) IIS would reassociate the applicable driver to the PDF. Kinda cool and kinda ghetto.

No comments:

Post a Comment