Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics 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:36 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
        objadapter.fill(ds,"tblslots")
Any help would be greatly appreaciated

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

Hello,

ASP.NET uses an ASPNET account to run under. This is the very problem you are having. What you can do is add the HOME\ASPNET user to your database and give it permissions, or set up impersonation in your account.

Brian
 
Old July 8th, 2004, 06:27 PM
Authorized User
 
Join Date: Jun 2004
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Further to Brians reply, I had a similar problem see:
Edward Stephen 1 22 06/29/2004 9:49:07 PM on Page two of the Topics list for the outcome.

Edward.

 
Old December 23rd, 2005, 02:09 PM
Registered User
 
Join Date: Dec 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

when i added this account i also had to grant permissions. I just granted them all and it worked. Took me three days to figure this out.






Similar Threads
Thread Thread Starter Forum Replies Last Post
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
error Login failed for user 'HOME\ASPNET' Raif General .NET 2 July 23rd, 2004 12:49 AM





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