473,757 Members | 8,085 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error : "Cannot open database XXX requested by login."

Hello.

I'm under Windows XP PRO SP1, IIS 5.1 ans SQL SERVER 2005
Express. When i try to open a connexion with :
<connectionStri ngs>
<add name="AppCnxStr "
connectionStrin g="Server=KLEO\ SQLEXPRESS;Inte grated
Security=True;D atabase=C:\Prog ram Files\Microsoft SQL
Server\MSSQL.1\ MSSQL\Data\wizo u.mdf"
providerName="S ystem.Data.SqlC lient" />
</connectionStrin gs>

I GET THIS ERROR :
_______________ _____
Cannot open database 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\ MSSQL\Data\wizo u.mdf' requested by login.
Login fails. Login failed for user 'KLEO\ASPNET'.
Description: An unhandled exception occurred during the
execution of the current web request. Please review the
stack trace for more information about the error and where
it originated in the code.

Exception Details: System.Data.Sql Client.SqlExcep tion:
Cannot open database 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\ MSSQL\Data\wizo u.mdf' requested by login.
Login fails. Login failed for user 'KLEO\ASPNET'.
_______________ _____
The file wizou.mdf exists. What have I to do? (sql server
2005!!) If i must changes something, plz tell me step by
step (i'm novice witg sql/asp.net 2).

Plz answer if u know ;)

Regards.

(msn: mi*********@NO--Sp4m.msn.com)
Nov 18 '05 #1
2 10649
Hi,

As far as I know in the database parameter of the connection string, you
don't have to put the physical database file, but the logical name of
the database in sqlServer.

HTH,
Stefano Mostarda MCP
Rome Italy

Mr.KisS wrote:
Hello.

I'm under Windows XP PRO SP1, IIS 5.1 ans SQL SERVER 2005
Express. When i try to open a connexion with :
<connectionStri ngs>
<add name="AppCnxStr "
connectionStrin g="Server=KLEO\ SQLEXPRESS;Inte grated
Security=True;D atabase=C:\Prog ram Files\Microsoft SQL
Server\MSSQL.1\ MSSQL\Data\wizo u.mdf"
providerName="S ystem.Data.SqlC lient" />
</connectionStrin gs>

I GET THIS ERROR :
_______________ _____
Cannot open database 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\ MSSQL\Data\wizo u.mdf' requested by login.
Login fails. Login failed for user 'KLEO\ASPNET'.
Description: An unhandled exception occurred during the
execution of the current web request. Please review the
stack trace for more information about the error and where
it originated in the code.

Exception Details: System.Data.Sql Client.SqlExcep tion:
Cannot open database 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\ MSSQL\Data\wizo u.mdf' requested by login.
Login fails. Login failed for user 'KLEO\ASPNET'.
_______________ _____
The file wizou.mdf exists. What have I to do? (sql server
2005!!) If i must changes something, plz tell me step by
step (i'm novice witg sql/asp.net 2).

Plz answer if u know ;)

Regards.

(msn: mi*********@NO--Sp4m.msn.com)

Nov 18 '05 #2
This is correct. Developer shouldn't usually even know anything about
database's physical wrokings. Anyway, using logical name is the preferred
way and that's how it's also in all samples on the web.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke

"stefano mostarda" <st************ **@fastwebnet.i t> wrote in message
news:us******** ******@TK2MSFTN GP09.phx.gbl...
Hi,

As far as I know in the database parameter of the connection string, you
don't have to put the physical database file, but the logical name of
the database in sqlServer.

HTH,
Stefano Mostarda MCP
Rome Italy

Mr.KisS wrote:
Hello.

I'm under Windows XP PRO SP1, IIS 5.1 ans SQL SERVER 2005
Express. When i try to open a connexion with :
<connectionStri ngs>
<add name="AppCnxStr "
connectionStrin g="Server=KLEO\ SQLEXPRESS;Inte grated
Security=True;D atabase=C:\Prog ram Files\Microsoft SQL
Server\MSSQL.1\ MSSQL\Data\wizo u.mdf"
providerName="S ystem.Data.SqlC lient" />
</connectionStrin gs>

I GET THIS ERROR :
_______________ _____
Cannot open database 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\ MSSQL\Data\wizo u.mdf' requested by login.
Login fails. Login failed for user 'KLEO\ASPNET'.
Description: An unhandled exception occurred during the
execution of the current web request. Please review the
stack trace for more information about the error and where
it originated in the code.

Exception Details: System.Data.Sql Client.SqlExcep tion:
Cannot open database 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\ MSSQL\Data\wizo u.mdf' requested by login.
Login fails. Login failed for user 'KLEO\ASPNET'.
_______________ _____
The file wizou.mdf exists. What have I to do? (sql server
2005!!) If i must changes something, plz tell me step by
step (i'm novice witg sql/asp.net 2).

Plz answer if u know ;)

Regards.

(msn: mi*********@NO--Sp4m.msn.com)

Nov 18 '05 #3

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

Similar topics

1
3964
by: Fie Fie Niles | last post by:
I have IIS installed on XP Professional workstation machine. I have an ASP page that open connection to an Access database, then when trying to update the database, it gave me the error "cannot update database or object is read-only". This is a workstation machine, not connected to any other computer, and I login to the PC using an administrator account. I already check the .MDB file is NOT read-only. But, I do not see the .LDB file....
2
411
by: Andreas Poller | last post by:
Hello, I have the following problem: I have a class deriving from ICustomTypeDescriptor: public __gc class TPropertyBag : public ICustomTypeDescriptor { private: ...
0
1958
by: Chun | last post by:
Dear All I am now facing a problem when i try to pass a custom datatable datatype value to a remote server. In the remote server, a method with System.Data.DataTable as input parameter is implemented. An error "Cannot be converted into parameter type System.Data.DataTable". Please help to provide me a solution for my problem. Thank you for your kind support.
1
3318
by: Sivaprasad | last post by:
Hi All, I am developing an app in Compact framework. When i run the app i am getting the error "Cannot connect to the remote Server". I put the same code in regular VB.Net it works fine.But not in Compact framework. Below is the code snippet i am using to connect to the database. Here the XML object will call the asp, which in turn calls a COM component which connects to the database and returns the data.
2
4113
by: Florian G. Pflug | last post by:
Hi Since sometime yesterday, my postgresql (7.4.5) reports "ERROR: cannot compare arrays of different element types", when I analyze a specific table in my database. Here is the tables definition: Column | Type | Modifiers -------------------+------------------------+---------------------------------------------------- self | datagraph."GOLink" | not null default
0
2065
by: mvdkwong | last post by:
I am trying to run a macro that will export a table into a fixed length file (see below). However, when I run it, I get the following error: "Cannot update. Database or object is read-only." I've tried a few things that I found in postings, but I'm not getting anywhere. Please advise on what I can do. '------------------------------------------------------------ ' mcr_Export_Test '
1
6111
by: marknewbery | last post by:
Hi, I have been trying to get a php, mySQL install to work and talk together on Windows XP SP2 with IIS. So far I installed and received a responce from php(V5 - manual install) though the <?php phpinfo(); ?> command which prints out the current settings of the php install. I then installed mySQL complete setup (V5) and ran the server instance
2
2198
by: qazmlp1209 | last post by:
class base { public: base() { } base(int number) { priNumber = number ;
2
3734
by: fniles | last post by:
I am using VB.NET 2005 and MS Access. I use OLEDbCommand ExecuteNonQuery to delete a record from a database. Whenever the program gets a message, it creates a new thread to process that message. In the thread I open the database, then process the message. Sometimes I get an error "Error Cannot open action query ''". Why can it execute the query and how to fix it ? Thank you. Public Class Best
14
3836
by: sarabonn | last post by:
hallo Iam trying to insert a row into a access database using visual c# and iam getting an error " cannot open the action query". here is my code private void button1_Click(object sender, EventArgs e) { txt1 = textBox1.Text; txt2 = textBox2.Text;
0
9298
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10072
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9906
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9737
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6562
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5172
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3829
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3399
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.