473,549 Members | 2,615 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

System.Data.Sql Client.SqlExcep tion: 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.Sql Client.SqlExcep tion: 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 13021
"weird0" <am********@gma il.comwrote in message
news:11******** **************@ b58g2000hsg.goo glegroups.com.. .
System.Data.Sql Client.SqlExcep tion: 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 connectionstrin g. For instance,
your attachdbfilenam e 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
3005
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> <http://www.physci.org/test/003url/index.html?url=http://mybiz.com/&that=this&when=now#21>...
0
1117
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 an error 'Event lstS_SelectedValueChanged' cannot be found. What am I doing wrong? Moe
1
2902
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 the new server. Suddenly I'm getting lots of intermittent errors of this type. The switch/hub/repeater that routes the traffic at the new...
1
2402
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 gentle, I know I'm not a C wizard already, that's why I'm here. The program will generate a guess based on input from another program I've already...
2
2732
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 Windows domain user account and tried to open the same page which has the databasde query code. When the two user tried to open the same page at the...
1
5961
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 SERVICE'. Source Error: An unhandled exception was generated during the execution of the current web
4
2389
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
1783
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 correct because it works when i do F5 from VWD, but when i try to start the same page from the browser, i get the error: "failure of creation of...
0
2025
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 corresponding Web Reference to the Web Site project I get the error listed below. I am able to create other Web Services on the same server and I am able...
2
1491
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 data is in heap, the object will take charge of deleting it. Thanks,
0
7521
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7451
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7720
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7959
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7473
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7810
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6044
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5369
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3483
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.