I ran into this issue as well. I spent about a half a day on the issue following all of the advice that this thread was discussing. I had no luck.
It almost seemed like the account that was reading my .MDF file did not have the permissions to access it.
Sure enough when I looked at the permissions for the .MDF file itself the Network Service account did not have access to read this file. I gave the Network Service account modify access to the .MDF file and its associated log file and then everything started working.
BTW, the Network Service account is the account I used for my app pool. I hope this helps anybody else who is having this issue.