An attempt to attach an auto-named database for file (file location).../Database.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

Greetings, I have just arrived back into the country (NZ) and back into ASP.NET.

 I am having trouble with the following:
An attempt to attach an auto-named database for file (file location).../Database.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

It has only begun since i decided i wanted to use IIS, I realise VWD comes with its own localhost, but since it is only temporary, i wanted a permanent shortcut on my desktop to link to my intranet page.

 Anyone have any ideas why i am getting the above error? have searched many places on the internet and not getting any closer.

Cheers ~ J

 

-1
jamesstar
9/3/2007 2:37:13 AM
asp.net.sql-datasource 29906 articles. 0 followers. Follow

2 Replies
1880 Views

Similar Articles

[PageSpeed] 52

Hi jamesstar,

Generally speaking, one physical mdf file cannot be attached twice in a perticular user instance. You can open Management Studio Express and login with an admin account(if you have one), see if the particular mdf file has already been attached into you database (another way is to use sseutil -l.exe, however, that's involves more steps). Explicitly detach that mdf file your application will work fine then.

Hope my suggestion helps


Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
-1
Bo
9/4/2007 7:52:13 AM

Hi, yes the information is very useful! I have begun using sseutil -l at home and at work, and it does do wonders. I think there was something else I did, but unfortunately cannot remember Indifferent.

 I am not yet very efficient on Management Studio Express, but I intend to be! I am having another problem from my home machine in regards to a read-only matter, but will post this later.

I must admit, these postings have been a fantastic help as I can log all the bugs I encounter and eventually understand what all the errors mean :-).

Cheers again!

0
jamesstar
9/5/2007 11:02:52 PM
Reply:

Similar Artilces:

An attempt to attach an auto-named database for file .../App_Data\Database.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
I am trying to display data on an asp page from a sql express database that is in the app_data folder however when trying to run the application I get the above error. I also get the error when I right click on the asp page from within the IIS website. But when when I right click the asp page from with VS and select 'view in browser' it displays fine!I have tried setting the ACL for the App_Data folder for mymachine\ASPNET  to R/W as well as for the *.mdf and *.ldf file  to no avail.What am I missing here?...

An attempt to attach an auto-named database for file C:..... failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
Hallo! In my local test-appication in Visual Web Developer 2008 Express Edition (VWD2008EE)  I can make a login with stored  login-data. After login I can't use any database. I use all standard DB-connections. The DB-Application-data are OK. Somewhere these DBs ar locked, but where?http://www.plbg.chPlanning of new IT Systems Hi, Would you please provide more details? What’s the connection string and is there database stored in folder App_Data? According to the error message, there may be several possible cause for the issue.  Please refer to the th...

Unable to open the physical file. Operating system error 5: "5(Access is denied.)". A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
PLEASE TELL ME A SOLUTION.... Server Error in '/PS' Application. The '/PS' is virtual directory of Local Host.Unable to open the physical file "G:\Personal Site Kit\App_Data\personal.mdf". Operating system error 5: "5(Access is denied.)".An attempt to attach an auto-named database for file G:\Personal Site Kit\App_Data\personal.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. Description: An unhandled exception occurred during the execution of the current web request. Please review th...

A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
Hi, Everything was working fine developing a website on my development PC: XP SP 2 SQLServerExpress Latest Release VWD Latest Release. Ive added web parts to my site and when i run it now i get the follwoing error see below:  Ive found various information on the internet but none seem to work for me.  Can anyone help?? An attempt to attach an auto-named database for file C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\WebSites\Savantis Ajax Website\App_Data\aspnetdb.mdf failed. A database with the same name exists, or specified file cannot be open...

An attempt to attach an auto-named database for file <file string> failed....BUT ONLY due to new SSE install
I built an app, works fine.  Had the development environment working fine (VS2005 (SP0) and SQL Server Express).  It had been stable for months, no problem. Then I had to reinstall XP Pro...(finally threw too many conflicting programs into it, I guess...) I managed to get VS2005 reinstalled ok.   However, when I opened and compiled my existing app in VS2005, using Cassini, I got the dreaded error:An attempt to attach an auto-named database for file <file string> failed. A database with the same name exists, or specified file cannot be opened, or it is located...

An attempt to attach an auto-named database for file failed.
Hi,I recently installed VS Web Developer Express Ediition and SQL Server Express and I'm doing the How To tutorials and I can't finish the basic data access walkthrough:http://msdn2.microsoft.com/en-US/library/tw738475.aspxBecause I get an error like this (link for complete error below): An attempt to attach an auto-named database for file C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\test.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.Description: An unhandled exception occurred during the execution...

An attempt to attach an auto-named database for file ... failed
When I attempt to run the Time Tracker Starter kit I receive the following error: An attempt to attach an auto-named database for file C:\WebSites\Test_TimeTracker\App_Data\aspnetdb.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. I checked SQL Express and I did originally have a database named aspnetdb that was installed by the QuickStarts. I have subsequently detached that database and moved the data and log files from SQL Express's data folder, however I still get the same error. I've opened mdf file in visual stu...

An attempt to attach an auto-named database for file failed
Hi I have a problem when I want to open a page with the database record. This page is created in Visual Web Developer 2005 Express. When I try to open a page I get the following error message even though the connection between the database is ok: An attempt to attach an auto-named database for file C:\Inetpub\wwwroot\membership\App_Data\aspnetdb.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace ...

An attempt to attach an auto-named database for file ... failed
Hi, I have created a Database.mdf under (.NETNUKE's) App_Data using VisualStudio 2005 (TE,Final) I am on win2k3, IIS6, .net 2.0 (final) I have given both ASP.NET and NETWORK SERVICE full control over the Website directory and its children objects. I have even tried making IIS impersonate a local administrator.  All of which still me this error when I go to the site the first time:  An attempt to attach an auto-named database for file F:\wwwroot\tenantport2\Website\App_Data\Database.mdf failed   I can connect to and br...

An attempt to attach an auto-named database for file.....failed
Just going through the online videos at MSDN to get a Membership site started - - everything works fine on my local machine (haven't we heard that before??) however, when I put it on the hosted site, and a user tries to log in, I get the following error: An attempt to attach an auto-named database for file c:\hosting\webhost4life\member\<path>\aspnetdb.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. This is a virtual directory, and there isn't another aspnetdb.mdf file anywhere in the parent direcories, or an...

An attempt to attach an auto-named database for file [filename] failed.
 I'm trying to set up what should be a simple web application using Visual Web Developer 2008 Express that uses a read only database using SQL Server Express 2008.  It works as expected in the development environment, but after I published the site to a test server and tried to pull up some of the data, I get An attempt to attach an auto-named database for file C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\History_Data.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. I've ma...

An attempt to attach an auto-named database for file aspnetdb.mdf
having exhaustively searched the forum and tried everything over the pas few days im still recieving :Error Caught in Application_Error eventError in: http://mysite.com/site1/index.aspxError Message: An attempt to attach an auto-named database for file E:\Inetpub\wwwroot\mvate.com\WapCms\App_Data\aspnetdb.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.Stack Trace:   at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)   at System.Data.ProviderBase.DbConnectionFactory.GetC...

An attempt to attach an auto-named database for "file" failed.
Hi, I did the security tutorial on this page and made some adjustments to it. Everything worked fien from withing VS2005. I now published the site and wanted to test it in real. i can browse to the default page and login page. When I try to login in I get follwowing error: An attempt to attach an auto-named database for "file.mdf "failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. conStr: <add name="Projects" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirec...

An attempt to attach an auto-named database for file
I build a WebApp which i use the default DataBase that come with the App_Data folder. I have Users and roles into that folder with all my tables regarding my new App. Why i cant make it work under IIS on my webserver ? When i open it with Visual Studio everything works but outside of it nothing. An attempt to attach an auto-named database for file c:\inetpub\wwwroot\Survey\App_Data\aspnetdb.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilena...

Web resources about - An attempt to attach an auto-named database for file (file location).../Database.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. - asp.net.sql-datasource

Grand Theft Auto V: “A Picket Fence and a Dog Named Skip” - YouTube
Rockstar Games is proud to announce that Grand Theft Auto V will arrive on the PlayStation 4 and Xbox One on November 18, 2014 with the PC version ...

Official: Ferrari North America CEO named Auto Exec of the Year
... with increasing the brand's market share on this side of the Atlantic by some 20 percent. And due to that success, he has been named 2012 Automotive ...

Keith Crain Named to Auto Hall of Fame - Media - Advertising Age
You’ve read all of your free items this month. To register, get added benefits and unlimited access to articles, Become a Member . Already a ...

Sharon Carty Named Editor of Yahoo Autos
Yahoo has named Sharon Carty editor-in-chief of its recently launched, single-focus site Yahoo Autos . Carty comes to Yahoo from AOL, where she ...

New York Auto Show: VW Golf Named World Car Of The Year
A panel of journalists named the redesigned Volkswagen Golf as World Car of the Year at the New York International Auto Show today.

Detroit Auto Show: Chevrolet Corvette and Chevrolet Silverado named North American Car and Truck of the ...
The Chevrolet Corvette Stingray captured the North American Car of the Year award today at the Detroit Auto Show while the Chevrolet Silverado ...

Grand Theft Auto 5 Trailer - A Picket Fence and a Dog Named Skip 1:15
Los Santos and its oddball inhabitants have never looked so good.

2013 Ford Fusion Named Green Car of the Year at the 2012 LA Auto Show
The all-new 2013 Ford Fusion has been named Green Car Journal ‘s 2013 Green Car of the Year at the 2012 LA Auto Show. The Ford Fusion emerged ...

Detroit Auto Show: Cadillac ATS, Dodge Ram named car, truck of year
Automotive journalists named the Cadillac ATS sports sedan and the Chrysler Ram 1500 pickup truck as the North American car and truck of the ...

Namesake Motors, Autos Paired With Who They Are Named After
... is a project by art director Jimm Lasser and photographer Ray Gordon that pairs automobiles with the person or character that they are named ...

Resources last updated: 11/29/2015 7:14:17 AM