Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET 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 July 8th, 2004, 01:34 PM
Authorized User
Join Date: Jun 2004
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Raif
Default error Login failed for user 'HOME\ASPNET'

Hi, I have a aspx page that I designed in web matrix and it works fine. however when i try to put it in visual studio I get the following error Login failed for user 'HOME\ASPNET' . While I don't know what that means it sort of looks like it is looking for a database called aspnet. The code for the connection goes as follows and calls the error at objadapter
  Dim objConn As New SqlConnection("server = '(local)';trusted_connection = true; database = 'tryagain'")
        Dim objAdapter As New SqlDataAdapter("SELECT [tblslots].* FROM [tblslots]", objConn)
        Dim Ds As DataSet = New DataSet()
        Dim objTable As DataTable
        Dim dv As DataView
        dim DRow
Any help would be greatly appreaciated

Old July 8th, 2004, 03:12 PM
Friend of Wrox
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts

Old July 23rd, 2004, 12:49 AM
Authorized User
Join Date: May 2004
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts

U should add a login from Sql Server to the Database u r trying to Query.The login of ASPNET must exists in your Database logins and it must have the access to that Database

To Add a new login to your that Database

Open Sql server -> expand security -> right click on logins and from General select ... Button and select from your local system, the login of Macine Name/ASPNET account and from Database access give the public access to your Database

After that the ASPNET account appears into your Database user accounts
And Asp.net would be able to Query your Database


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
Error 18452: Login Failed for user '(null)'. Reas Nigeeee VB Databases Basics 2 February 10th, 2005 12:19 PM
Error: Login failed for user sa -urgent hums ADO.NET 5 September 28th, 2004 05:52 AM
Urgent : Getting Error :Login failed for user sa hums SQL Server ASP 1 September 28th, 2004 05:51 AM

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