Unable To Attach Database in SQL Server Management Studio

If you have a SQL Server database that you have created in Visual Studio, and you want to attach the database in SQL Server Management Studio but get an access denied error, then give read permissions to the account your SQL Server is running under such as NETWORK SERVICE on the folder under which your database files are stored.