<blockquote>
  <p>CREATE DATABASE permission denied in database 'master'.
  An attempt to attach an auto-named database for file 
  C:\Documents and Settings\..\App_Data\HelloWorld.mdf failed. 
  A database with the same name exists, or specified file cannot be
  opened, or it is located on UNC share.</p>
</blockquote>

<p>I've found these links:</p>

<ul>
<li><a href="http://blog.benhall.me.uk/2008/03/sql-server-and-vista-create-database.html" rel="nofollow noreferrer">http://blog.benhall.me.uk/2008/03/sql-server-and-vista-create-database.html</a></li>
<li><a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=702726&amp;SiteID=1" rel="nofollow noreferrer">http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=702726&amp;SiteID=1</a></li>
</ul>

[{'answer_id': 14881, 'author': 'Nick Berardi', 'author_id': 17, 'author_profile': 'https://Stackoverflow.com/users/17', 'pm_score': 0, 'selected': False, 'text': "<p>Yes, a previous attachment wasn't unattached properly, or it was attached manually.  Go in to Management Studio connect to the database, and disconnect the long database name that looks like a file path.  Then try again it should work.</p>\n"}, {'answer_id': 15319, 'author': 'Mark Cidade', 'author_id': 1659, 'author_profile': 'https://Stackoverflow.com/users/1659', 'pm_score': 0, 'selected': False, 'text': '<p>My friend fixed it by just using another directory, namely C:\\TEMP. I think it was just a permissions thing.</p>\n'}, {'answer_id': 39514, 'author': 'baldy', 'author_id': 2012, 'author_profile': 'https://Stackoverflow.com/users/2012', 'pm_score': 3, 'selected': True, 'text': "<p>Generally the user that you are using to run the SQL Server service will not have access to your personal user folders, that is why you're getting the error.  You either need to change the credentials used for the service, or move the database to another folder, which did the trick in your case.</p>\n"}, {'answer_id': 1412028, 'author': 'zanona', 'author_id': 165750, 'author_profile': 'https://Stackoverflow.com/users/165750', 'pm_score': 2, 'selected': False, 'text': '<p>For me helped a lot to set this tag under system.web tag on the web.config file:</p>\n\n<pre><code>&lt;system.web&gt;\n    &lt;identity impersonate="true" userName="admin_user" password="admin_password" /&gt;\n...\n</code></pre>\n\n<p>Hope this can help somebody</p>\n'}, {'answer_id': 2437541, 'author': 'Isfan Habib - Irfan Ahmad', 'author_id': 292841, 'author_profile': 'https://Stackoverflow.com/users/292841', 'pm_score': 1, 'selected': False, 'text': '<p>I was also experiencing the same Problem, finally i find Solution-\nSOLUTION --  Is simple Move or Cut your database from the App_Data folder to any where (e.g., Desktop) then Move or Cut back DataBase to App_Data folder. \nThat is it..........</p>\n\n<p>Hope it work!</p>\n'}, {'answer_id': 5905424, 'author': 'DanielEli', 'author_id': 273163, 'author_profile': 'https://Stackoverflow.com/users/273163', 'pm_score': 2, 'selected': False, 'text': '<p>I was stuck on this today with compound issue in mvc3 and entity framework code first.</p>\n\n<p>My SqlExpress install is messed up (permissions issues) so I switched to SqlCE.  </p>\n\n<p>My ConnectionString.Name attribute didn\'t match my "ProjectNameContext" class name.  </p>\n\n<p>When the connection string isn\'t found, it uses default conventions.  Default conventions means my SqlExpress service with a database name like "ProjectNameContext".  The permissions are messed up on that so I got a permissions error on SqlExpress when I thought I was using SqlSE</p>\n'}, {'answer_id': 41693895, 'author': 'Mohsen.Sharify', 'author_id': 1044535, 'author_profile': 'https://Stackoverflow.com/users/1044535', 'pm_score': 0, 'selected': False, 'text': '<p>for some guys like me,add "User Instance=true" to your connection string</p>\n'}]
['https://Stackoverflow.com/questions/14872', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1659/']