Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 20th, 2009, 04:33 PM
Registered User
 
Join Date: Apr 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Login failed for user 'machine_name\ASPNET'

I'm getting the error: Login failed for user 'machine_name\ASPNET'.

I have SQL Server 2005 Standard and IIS, both running on the same Windows XP machine.

I'm using Integrated Windows authentication. I have configured the SQL Server login 'machine_name\ASPNET'. I have mapped that login to 'ASPNET', the user of my database. ASPNET is a member of the db_datareader and db_datawriter roles. My connectionString is "Data Source=(local);Initial Catalog=IS2O.mdf;Integrated Security=True".

I checked that TCP/IP connections were enabled. I checked that this login has permission to connect to the database engine. I checked that logins were enabled and were not locked out for this login.

I tried configuring for SQL Server Authentication, and I get the same error: "Cannot open database IS2O.mdf requested by the login. The login failed. Login failed for user 'is2o_user'."

What am I missing? Does anyone have any ideas as to what is wrong?

Thanks.

Last edited by a440guy; April 20th, 2009 at 05:00 PM.. Reason: fix typo.
 
Old April 21st, 2009, 12:10 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Take a look here: http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=395

Also, try dropping the .mdf from the Initial catalog. When you refer to database, you don't need to refer to it's physical extension.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old April 21st, 2009, 02:51 PM
Registered User
 
Join Date: Apr 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Doh!

That's exactly it -- the Initial Catalog should be IS2O, not IS2O.mdf. The .mdf is a vestige left over from editing the connection string that I used in development.

Thanks!
 
Old April 21st, 2009, 05:10 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You're welcome...

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!




Similar Threads
Thread Thread Starter Forum Replies Last Post
error Login failed for user 'HOME\ASPNET' Raif ASP.NET 1.0 and 1.1 Basics 3 December 23rd, 2005 02:09 PM
login failed for user nt authority\anonymous login rj1406 Classic ASP Databases 1 October 24th, 2004 09:15 AM
error Login failed for user 'HOME\ASPNET' Raif General .NET 2 July 23rd, 2004 12:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.