Last post Jan 14, 2009 02:43 PM by castblackjacket
Jan 14, 2009 10:07 AM|castblackjacket|LINK
I'm having some trouble with a MDF file which contains the News stories for a website I'm building. On my home machine I am running the full version of Visual Studio 2005, so I created the MDF file there, and the News Table complete with sample stories.
However when I ZIP the entire site and bring it to my work PC (running Visual Studio 2005 Express Edition) and attempt to preview a page containing a SQLDataSource I get the following error:
'An attempt to attach an auto-named database for file C:\....\News.mdf has failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.'
I know error messages are supposed to help, but I've Googled it several times and searched based around this post title to no avail.
I don't know if this will help explain further, but I can remember a project I was working on previously where the MDF file was already provided to me, and I was able to actually see the file in 'App_Data', but with this project I cannot.
Can anyone shed any light?
Thanks for reading. Cast.
Jan 14, 2009 01:45 PM|Kumar Reddi|LINK
Did you put the file in a shared folder or network folder?
Jan 14, 2009 02:09 PM|castblackjacket|LINK
I'm not sure how to check, but the MDF file was created inside Visual Studio and I can only see the file inside the Server Explorer, not in Windows. The website is located on the Desktop of the machine in question, but it is on the desktop which could be
a shared area as it is availble to our local network? Does this make any sense?
Jan 14, 2009 02:25 PM|Kumar Reddi|LINK
So you can not even find where the file is on your desktop? If you do, may be you need to give the Modify permissions to the SQL Service account, which is typically NETWORK SERVICE account
Jan 14, 2009 02:43 PM|castblackjacket|LINK
Sorry dude, just actually followed the connection string, the file is in My Documents for some weird and bizarre reason. Thanks for your help anyways!