The Daily Parker

Politics, Weather, Photography, and the Dog

So kludgy

I noted earlier that this code base I'm working with assumes all file stores look like a disk-based file system. This has forced me to do something totally ugly.

All requests for files get pre-pended with a hard-coded string somewhere in the base classes—i.e., the crap I didn't write. So when I want to use the Azure storage container "myfiles", some (but not all) requests for files will use ~/App_Data/files/myfiles (or whatever is configured) as the container name. Therefore, the Azure provider has to sniff every incoming request and remove ~/App_Data/files/ or the calls fail.

Don't even get me started on how the code assumes HttpContext.Current will exist. That has made unit testing a whole new brand of FFS.

Comments are closed