 |
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0  | This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 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
|
|
|
|
|

August 14th, 2006, 12:52 PM
|
|
Registered User
|
|
Join Date: Aug 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
SQL connection problems username passwords
I am working through the book with a copy of MS Visual Studio 5 (beta 2) and can't seem to connect the ASPNETDB.MDF file from within Visual Studio's "Server Explorer" tab. When trying, I get the following error: Login failed for user "Admin". The user is not associated with a trusted SQL Server Connection.
Is there another username/password combo I need to use? Can I even connect like this?
This is the username/password combo I'm using:
Username: Admin; Password: admin
I've also tried: uid=DBuserName;pwd=SecretPassword
More info about what I'm doing ...
From within Visual Studio's "Server Explorer" tab...
I click on the "Connection to Database" icon (yellow can with the green plus sign) and get the "Add Connection" dialog box. I use the following settings:
Data source: Microsoft SQL Server Database File (SqlClient)
Database file name (new or existing): C:\CFusionMX\wwwroot\TheBeerHouse\TB H_Web\App_Data\ASPNETDB.MDF
Use SQL Server Authentication
Username: Admin
Password: admin
|
|

August 14th, 2006, 02:29 PM
|
|
Authorized User
|
|
Join Date: May 2006
Posts: 99
Thanks: 0
Thanked 1 Time in 1 Post
|
|
The problem is that the DB doesn't need SQL authentication unless you have changed SQL Express to require it. In this case, you should just use Windows Authentication.
|
|

August 14th, 2006, 03:15 PM
|
|
Registered User
|
|
Join Date: Aug 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thank you for your reply. If I use windows authentication I get the following error: "Failed to generate user instance of SQL Server due to a failure in copying database files. The connection will be closed."
After reading, I don't think I have SQL Server Express installed. I'm a little hesitant to install it, because it looks like I have to uninstall Visual Studio Beta 2, etc. Under the installation instructions for SQL Server Express it says, "... uninstall beta versions of SQL Server 2005, Visual Studio 2005, and the .NET Framework 2.0. ..."
I'll let you know how it all works out.
|
|

August 14th, 2006, 09:44 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I hope you uninstall all the beta versions. They will expire soon and you'll be unable to do anything. The final release versions of the Express products are all free and they work well.
None of this is related to your error, though. There's no reason why you need to connect to that DB using the filesystem. The filesystem method is easy if it works, but the name method will work also. The database name defaults to COMPUTERNAME\SQLEXPRESS. And Windows authorization will work interactively, but the ASPNET user account (assuming WinXP) won't have much luck with that unless you create an account for him in your database.
The deployment chapter in the book discusses SQL accounts and gives your some sample SQL commands.
Eric
|
|

August 15th, 2006, 06:12 PM
|
|
Registered User
|
|
Join Date: Aug 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
What a Chore!!!
I wanted to get SQL Express up and running, so I uninstalled all the beta versions of VS, which had already expired. (I had already turned back the clock on my machine to keep the beta period going.) Uninstalling all the Beta stuff was a pain in my CPU! After about 4 hours of hunting little things down, I finally got it, though. I wouldn't wish that on my worst enemy. I suggest to others who want to uninstall VS Beta to download a copy of Windows Install Clean Up and order pizza and beer... and more beer. When I finally got everything working, I loaded up SQL Express and then a demo version of VS Professional. Now, everything works perfect! I can now "hook up" the ASPNETDB.MDF file.
Bellinaso's book is teaching me a bunch.
jb
|
|

August 15th, 2006, 10:54 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Just for the record, you should always install beta in a VMWare or VPC session. I've seen some serious compatibility problems in betas. For example, one of the early SQL 2005 betas conflicted with SQL 2K, and SQL 2K quit working.
VMWare is sweet - version 5 is pretty fast and I love the ability to take snapshots and revert at will.
Eric
|
|

August 16th, 2006, 11:45 AM
|
|
Registered User
|
|
Join Date: Aug 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Everything is humming along fine now.
|
|
 |