Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: Beginning ASP.NET 4 : in C# and VB
|
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB 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 August 26th, 2012, 06:05 AM
Authorized User
 
Join Date: Aug 2012
Posts: 19
Thanks: 8
Thanked 0 Times in 0 Posts
Default Error : Cannot open database "*" requested by the login.Login failed for user '*'

Hi
I Starting Out Whit Wrox.Beginning.ASP NET 4 in CSharp and VB

But i Have Problem During Connecting To DB (MS SQL) In Plesk Control Panel !

When I Uploaded My Project Over The Internet in Plesk Every Thing Was Ok But Every Pages That Contain DB Table Not Working And Show This Error :

Cannot open database "*" requested by the login. The login failed.
Login failed for user '*'.

By The Way I've defined UserName And PassWrod For DB Which I've Created In Plesk Control Panel And I've Made BackUp From My DB In Visual Studio

Here Are My Connection Strings :

<connectionStrings>
<clear/>
<add name="ApplicationServices" connectionString="data source=*;Initial Catalog=ApplicationServices.mdf;User ID=*;password=*" providerName="System.Data.SqlClient"
/>

<add name="ConnectionString" connectionString="Data Source=*;Initial Catalog=ConnectionString.mdf;User ID=*;password=*"
providerName="System.Data.SqlClient"
/>
</connectionStrings>
 
Old August 26th, 2012, 07:17 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Did you just start, or did you already look at Chapter 19 and Appendix B? A lot of this is covererd in these chapters.

The problem in your case seems to be the .mdf extension. When using an initial catalog, you use the database name, without the extension.

Quote:
Cannot open database "*" requested by the login. The login failed.
Does it really say "*"? Or did you change that?

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!
The Following User Says Thank You to Imar For This Useful Post:
kafshdoozak (August 26th, 2012)
 
Old August 26th, 2012, 08:34 AM
Authorized User
 
Join Date: Aug 2012
Posts: 19
Thanks: 8
Thanked 0 Times in 0 Posts
Default Hi

No I've read chapter 19 and Appendix B ANd It is Not * , The frist One is My DB Name With Extension And Secend One is My DB UserName ,

Pls Yourself Take a look :

http://pishgamanekarate.ir/student.aspx
 
Old August 26th, 2012, 08:43 AM
Authorized User
 
Join Date: Aug 2012
Posts: 19
Thanks: 8
Thanked 0 Times in 0 Posts
Default O

O my God , its working WithOut Extension , Thx A million Mr.Imar

And Your book is Wonderful

Thx again!





Similar Threads
Thread Thread Starter Forum Replies Last Post
"Conversion to Dalvik format failed with error 1" egg86 BOOK: Professional Android 2 Application Development 1 September 24th, 2010 03:11 PM
Chapter 18: Getting "Failed to generate a user instance of SQL Server" error HungryCaterpillar BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 5 November 11th, 2009 01:56 PM
Add a CheckBox DataColumn to my DataGridView, Null format: "" or "True" but Error: F ismailc C# 2005 0 September 25th, 2009 04:56 AM
Chap 15: Cookies / "Remember Me" Login sw02 BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 3 August 12th, 2009 11:18 AM
Cannot open database "localdb_auth" requested by the login. The login failed. t00ks ASP.NET 2.0 Professional 5 March 2nd, 2009 08:43 AM





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