473,378 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

System.Data.SqlClient.SqlException: An attempt to attach an auto-named database for file "Location" failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

System.Data.SqlClient.SqlException: An attempt to attach an auto-
named database for file "Location" failed. A database with the same
name exists, or specified file cannot be opened, or it is located on
UNC share.

I am getting the above the exception while connecting to the db and i
have written a web-service...
i.e. a webmethod.

What do I do? Why am i getting this error ? How can i remove this
error so i can start coding.....

Apr 19 '07 #1
1 12999
"weird0" <am********@gmail.comwrote in message
news:11**********************@b58g2000hsg.googlegr oups.com...
System.Data.SqlClient.SqlException: An attempt to attach an auto-
named database for file "Location" failed. A database with the same
name exists, or specified file cannot be opened, or it is located on
UNC share.

I am getting the above the exception while connecting to the db and i
have written a web-service...
i.e. a webmethod.
It's a problem in your connection string. You are probably using Sql
Server Express in the "user instance" mode, and something is wrong in the
parameters that you are providing in the connectionstring. For instance,
your attachdbfilename parameter may be pointing to a file that doesn't
exist, or that is not accessible to the user identity that is executing the
web service.
Apr 20 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Andrew Thompson | last post by:
I have written a few scripts to parse the URL arguments and either list them or allow access to the value of any parameter by name. <http://www.physci.org/test/003url/index.html>...
0
by: Moe Sizlak | last post by:
Hi There, I am trying to get the value from a listbox, I have a class in my code behind page and I have created a sub to try to capture the selected value of the listbox but it keeps giving me...
1
by: HK | last post by:
I just moved an ASP.NET application to a new web server at a different location of ours. The SQL Server machine was moved to that new location at the same time as the web site DNS was pointed to...
1
by: Sluggoman | last post by:
Hi all, Am floundering through a course in which C was not a pre-req, but the assignment is in C - If someone could point out where I am going way off the rails, I'd apprecciate it. Please be...
2
by: sxiao | last post by:
Hi, there I got a NullReferenceException when there are more than one users trying to open the same page at the same time. The senerio is: Two users logged into the web application using the...
1
by: TOLI | last post by:
Where do a set the right user rights for ASP.NET 2 to connect to a SQL service Se below // Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'NT AUTHORITY\NETWORK...
4
by: PiotrKolodziej | last post by:
Hi This is my simple code: public Form1() { this.Size = configFile.getSize(); this.Location = configFile.getLocation(this.Size.Width);
0
by: casper | last post by:
Hi, I use asp.net 2.0 and VWD on a windows 2000 server with IIS 5.0. This computer is also the domain controler. The user who uses the aspx page is the domain administrator. The aspx code is...
0
by: nicomp | last post by:
I created a Web Service: I imported System.Data.SqlClient so I could access SQL server tables programmatically. The web service builds and deploys with no problems. When I try to add the...
2
by: shuisheng | last post by:
Dear All, I am wondering if there is a way to know if a data is in heap? My case is like this: I have a data and want to shallowly copy it into an object (just pass its head pointer). If the...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.