473,785 Members | 3,067 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cannot open database from web

I am getting the message below trying to open the SQL 2005 db in
default.aspx.

System.Data.Sql Client.SqlExcep tion: Cannot open database "Mydata" requested
by the login. The login failed.
Login failed for user 'MYXP\generic'

The web site is on an XP machine with 2005 Express. I setup a login called
generic on our domain and then put that login and password into the identity
impersonate section of web.config
Is something more than domain user needed to get into the web application?
The web is strictly windows authority. Thanks.

David
Oct 1 '08 #1
3 1370
"David C" <dl*****@lifeti meinc.comwrote in message
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
I am getting the message below trying to open the SQL 2005 db in
default.aspx.

System.Data.Sql Client.SqlExcep tion: Cannot open database "Mydata"
requested by the login. The login failed.
Login failed for user 'MYXP\generic'

The web site is on an XP machine with 2005 Express. I set up a login
called generic on our domain and then put that login and password into the
identity impersonate section of web.config.
Yes, but did you add a user to the Mydata database and map it to the generic
login?

And then give that user sufficient permissions in the Mydata database?
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 1 '08 #2
Mark,
I thought that having "Domain Users" was enough. Am I wrong? Thanks.

David
"Mark Rae [MVP]" <ma**@markNOSPA Mrae.netwrote in message
news:Or******** *****@TK2MSFTNG P03.phx.gbl...
"David C" <dl*****@lifeti meinc.comwrote in message
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
>I am getting the message below trying to open the SQL 2005 db in
default.aspx .

System.Data.Sq lClient.SqlExce ption: Cannot open database "Mydata"
requested by the login. The login failed.
Login failed for user 'MYXP\generic'

The web site is on an XP machine with 2005 Express. I set up a login
called generic on our domain and then put that login and password into
the identity impersonate section of web.config.

Yes, but did you add a user to the Mydata database and map it to the
generic login?

And then give that user sufficient permissions in the Mydata database?
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 2 '08 #3
"David C" <dl*****@lifeti meinc.comwrote in message
news:eu******** ******@TK2MSFTN GP05.phx.gbl...
>>I am getting the message below trying to open the SQL 2005 db in
default.asp x.

System.Data.S qlClient.SqlExc eption: Cannot open database "Mydata"
requested by the login. The login failed.
Login failed for user 'MYXP\generic'

The web site is on an XP machine with 2005 Express. I set up a login
called generic on our domain and then put that login and password into
the identity impersonate section of web.config.

Yes, but did you add a user to the Mydata database and map it to the
generic login?

And then give that user sufficient permissions in the Mydata database?
Even if you are using Windows authentication, permissions still need to be
set...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 2 '08 #4

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

Similar topics

1
8715
by: Nand Belani | last post by:
Hi, I have a MS Access 2000 database on the network, it is secured and the mdw file is on the network. The database works for most of the users on the network, but does not open for two of the users. It gives "CANNOT LOCK FILE" error. There is really no difference between these two users and the other users who can log on to the database. The rights to the shared directory, where the database resides are the same. can somebody advice me...
0
2133
by: Mr.KisS | last post by:
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;Integrated Security=True;Database=C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\wizou.mdf" providerName="System.Data.SqlClient" />
2
10650
by: Mr.KisS | last post by:
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;Integrated Security=True;Database=C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\wizou.mdf" providerName="System.Data.SqlClient" />
10
2134
by: vvenk | last post by:
Hello: When I tried to use an Access database, I get the following exception: Server Error in '/WebGrid' Application. -------------------------------------------------------------------------------- The Microsoft Jet database engine cannot open the file 'D:\Program Files\Infragistics\NetAdvantage 2005 Volume 2\ASP.NET\Samples\Data\samplebrowser.mdb'. It is already opened exclusively
2
2123
by: Enska | last post by:
I have problems connecting my access database I get information .. I cant use my database and I'm administrator on my computer so permission shutnot bee problem, but I dont know Where is the problem. Can enybody help me!!!! Server Error in '/Koulu/tietokannat' Application. -------------------------------------------------------------------------------- The Microsoft Jet database engine cannot open the file...
1
1985
by: bennett | last post by:
I'm trying to write an ASPX page that uses an OleDbDataAdapter to get data from a SQL Server database. When I test the connection, it returns success, and when I preview the data using the Adapter's "preview data" right-click option, it works, but when I load the actual page, I get the error "Cannot open database requested in login 'cookiecutter'. Login fails." It seems to work when I use a pre-existing database like Northwind or...
4
4622
by: snow | last post by:
Hi all, I have a VB.net program installed in a xp home with sp2,after installation, get error "Cannot open a database from a previous version of your application. The database is a 97 Access file. Could someone tell me what cause this problem? Thanks for your help!
1
1694
by: martinbr_2000 | last post by:
I have an access database that has been split and resides in the network share. When the access database is currently being updated by someone, and I try to open the database, I cannot open the file by double clicking on the database filename, for example, \\sharename\testdb.mdb I have to launch MS access, go to the file, then open the file from within MS Access.
0
1085
by: namrataa | last post by:
Cannot Open default database. Invalid login for \ -------------------------------------------------------------------------------- Hi, I have written services in WCF using C# and SQL Server 2005 which comes inbuilt with VS2008 and hosted using IIS. the service is to check for valid user and register new user. The problem is that the application works properly. But when I want to check the database in the server explorer I get error...
3
1748
by: Raymond Chiu | last post by:
Dear All, I have posted my question as below. But no answers, hope it can found here. http://forums.microsoft.com/msdn/ShowPost.aspx?postid=3377176&isthread=true&siteid=1&authhash=e09bd5812ef06751e9618ca5e2acbf8709a7521a&ticks=633469349810029562
0
9645
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
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
9950
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
8972
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6740
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
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4053
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
2
3646
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2879
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.