Wrox Programmer Forums
|
BOOK: Beginning ASP.NET Databases Also see the forum ASP Databases for more general discussions of ASP database issues not directly related to these books.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET Databases 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 November 21st, 2003, 01:34 AM
Authorized User
 
Join Date: Oct 2003
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Need help Msde

Hi
I recently purchased Asp.net Databases using Vb
I am having difficulty connecting to MSDE keep getting login error for user.(I am using Visual Studio.net)
This is the error

Login failed for user 'FRANK\ASPNET'

[SqlException: Login failed for user 'FRANK\ASPNET'.]
   System.Data.SqlClient.ConnectionPool.GetConnection (Boolean& isInTransaction) +472
   System.Data.SqlClient.SqlConnectionPoolManager.Get PooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
   System.Data.SqlClient.SqlConnection.Open() +384
   sqlconnect.WebForm1.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\sqlconnect\webform1.aspx.cs:28
   System.Web.UI.Control.OnLoad(EventArgs e) +67
   System.Web.UI.Control.LoadRecursive() +35
   System.Web.UI.Page.ProcessRequestMain() +73

This is what i do

String strConnection ="server=FRANK\\NETSDK;database=northwind;integrat ed security=true";
               SqlConnection objConnection = new SqlConnection(strConnection);
 objConnection.Open
objConnection.Close

Does anyone have suggestions on how to connect to MSDE(microsoft sql 2000)

Or would anyone have the database Bids that is used in chapter 12
of the book written in an Access file.

Thanks



 
Old November 21st, 2003, 04:36 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 Frank,

This problem is caused by the fact that the ASP.NET account does not have permissions to access the database.

There are a few ways to solve this:

1. Don't use Integrated Security, but SQL Server authentication instead. At installation time, you had to supply a password for the SA account, so you can use that (not recommended on a production server). Take a look here for the right connection string, under Standard Security.

2. Use the Enterprise Manager for SQL Server to manage your MSDE database. Then you're able to add the ASPNET account to the database you're using. The Enterprise Manager (EM) does not come with the MSDE, but it does come with a trial version of SQL Server. I am not 100% sure, but I believe that there is no expiry date for the EM. This means you can still use it to manage MSDE databases, even after SQL Server has expired. I am not an expert on licenses, so this may violate your license agreement with Microsoft. Check first!

3. Use command line tools or Stored Procedures to add your users to your database and give them the necessary rights. This is a bit tricky at first, but it can be useful knowledge. Take a look at System Stored Procedures like sp_grantdbaccess in the SQL Server books online.

HtH,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Help regarding MSDE beetle_jaipur SQL Server ASP 0 August 13th, 2007 07:00 AM
MSDE dogfish227 BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 1 August 12th, 2004 05:07 AM
can not connect to msde isheikh All Other Wrox Books 13 February 10th, 2004 07:34 PM
MSDE stu9820 ASP.NET 1.0 and 1.1 Basics 3 October 2nd, 2003 02:07 PM





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