Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP 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 August 12th, 2004, 01:57 PM
Registered User
 
Join Date: Aug 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Database Connection Problem with ASP.NET

I'm just starting to learn ASP.NET. The web page I created using sqlConnection to connect SQL Server(MSDE) database, and the database is running on my local machine. When I create my sqlConnection, I chose to use Windows NT integrated security. I tested my connection after I created, it works fine. However, when I try to display the web page, it gives me following error message:

Login failed for user 'ITL25\ASPNET'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'ITL25\ASPNET'.

Source Error:


Line 133: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Line 134: 'Put user code to initialize the page here
Line 135: SqlDataAdapter1.Fill(DataSet1)
Line 136: DataGrid1.DataSource = DataSet1
Line 137: DataGrid1.DataBind()


Source File: c:\inetpub\wwwroot\myWebApp\DisplayAuthors.aspx.vb Line: 135


I pretty sure that I have the user "ITL25\ASPNET" as the owner of the database.

Could anyone help me on this situation? Thanks a lot!

Kai
 
Old August 12th, 2004, 07:02 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

Are you sure that user is DBO? If it isn't DBO, does it have select or execute permissions on table/proc?

Brian
 
Old August 13th, 2004, 12:12 PM
Registered User
 
Join Date: Aug 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your reply. When I first install .Net, I only installed MSDE which doesn't have enterprise manager to manage the database. Then I installed the full version of MS SQL server, and added ASPNET user via Enterprise Manager. After that, everything works fine.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Database connection error. asp.net/dreamw/access peacesquid Classic ASP Databases 1 July 28th, 2005 06:56 PM
Database Connection Problem with ASP.NET fukai100 SQL Server ASP 1 August 12th, 2004 07:37 PM
ASP.NET database connection MySQL socoolbrewster ASP.NET 1.0 and 1.1 Basics 3 November 21st, 2003 07:12 PM
ASP Database Connection-File permission problem goljazoran BOOK: Beginning ASP 3.0 0 November 10th, 2003 10:09 AM





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