473,399 Members | 3,656 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,399 software developers and data experts.

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 :
<connectionStrings>
<add name="AppCnxStr"
connectionString="Server=KLEO\SQLEXPRESS;Integrate d
Security=True;Database=C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\wizou.mdf"
providerName="System.Data.SqlClient" />
</connectionStrings>

I GET THIS ERROR :
____________________
Cannot open database 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\wizou.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.SqlClient.SqlException:
Cannot open database 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\wizou.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 10624
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 :
<connectionStrings>
<add name="AppCnxStr"
connectionString="Server=KLEO\SQLEXPRESS;Integrate d
Security=True;Database=C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\wizou.mdf"
providerName="System.Data.SqlClient" />
</connectionStrings>

I GET THIS ERROR :
____________________
Cannot open database 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\wizou.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.SqlClient.SqlException:
Cannot open database 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\wizou.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.it> wrote in message
news:us**************@TK2MSFTNGP09.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 :
<connectionStrings>
<add name="AppCnxStr"
connectionString="Server=KLEO\SQLEXPRESS;Integrate d
Security=True;Database=C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\wizou.mdf"
providerName="System.Data.SqlClient" />
</connectionStrings>

I GET THIS ERROR :
____________________
Cannot open database 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\wizou.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.SqlClient.SqlException:
Cannot open database 'C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\wizou.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
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...
2
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
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...
1
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...
2
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...
0
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...
1
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 ...
2
by: qazmlp1209 | last post by:
class base { public: base() { } base(int number) { priNumber = number ;
2
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....
14
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,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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,...
0
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...
0
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...
0
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,...
0
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...

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.