| | |
Log In Failure
Please support our ASP.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
![]() |
•
•
Join Date: Jul 2004
Posts: 8
Reputation:
Solved Threads: 0
I am building my 1st .asp application and filling a data grid from a Nothwind DB. When I try to open the connection it gives me user log in error. Can anyone guide me here ?? Thank you.
Exception Details: System.Data.OleDb.OleDbException: Login failed for user 'WITHEATH\ASPNET'
Line 44: myConnection.Open()
Here is my code snippet:
VB:
--------------------------------------------------------------------------------
Public myConnString As String = "Provider=SQLOLEDB;Data
Source=localhost;Initial Catalog=Northwind;Integrated Security=SSPI;"
Public myConnection As New System.Data.oledb.OleDbConnection(myConnString)
myConnection.Open()
mySelectCommand.CommandText = "SELECT * from users"
mySelectCommand.Connection = myConnection
myAdapter.SelectCommand = mySelectCommand
myAdapter.Fill(myDataSet, "users_table")
If Not (IsPostBack) Then
DataGrid1.DataBind()
End If
Exception Details: System.Data.OleDb.OleDbException: Login failed for user 'WITHEATH\ASPNET'
Line 44: myConnection.Open()
Here is my code snippet:
VB:
--------------------------------------------------------------------------------
Public myConnString As String = "Provider=SQLOLEDB;Data
Source=localhost;Initial Catalog=Northwind;Integrated Security=SSPI;"
Public myConnection As New System.Data.oledb.OleDbConnection(myConnString)
myConnection.Open()
mySelectCommand.CommandText = "SELECT * from users"
mySelectCommand.Connection = myConnection
myAdapter.SelectCommand = mySelectCommand
myAdapter.Fill(myDataSet, "users_table")
If Not (IsPostBack) Then
DataGrid1.DataBind()
End If
You need to add a username and password to your connection string
. Either that, or add the user [MachineName]\ASPNET to your SQL Database Security.
. Either that, or add the user [MachineName]\ASPNET to your SQL Database Security. -Ryan Hoffman
.NET Specialist / Webmaster, Extended64.com.
Please do not email or PM me with support questions. Please direct them to the forums instead.
.NET Specialist / Webmaster, Extended64.com.
Please do not email or PM me with support questions. Please direct them to the forums instead.
![]() |
Similar Threads
- Trouble configuring ASP.NET & iis 5.1 (ASP.NET)
- Error Log in new PC with XP before delivery (Windows NT / 2000 / XP)
- Need help, to prevent hack attempts (Network Security)
- Network sharing problem (Networking Hardware Configuration)
- Failure to load hardware monitor driver (Windows NT / 2000 / XP)
- Registry File Failure? (Windows NT / 2000 / XP)
- logging problems and keyboard failure (Windows NT / 2000 / XP)
Other Threads in the ASP.NET Forum
- Previous Thread: Regarding ListItem Class
- Next Thread: A good example of Master/Detail INPUT webform
| Thread Tools | Search this Thread |
.net 2.0 3.5 activexcontrol advice ajax alltypeofvideos asp asp.net bc30451 bottomasp.net browser businesslogiclayer c# c#gridviewcolumn checkbox class commonfunctions compatible confirmationcodegeneration content contenttype countryselector courier css dataaccesslayer database datagrid datagridview datagridviewcheckbox datalist development dgv dropdownlist dropdownmenu dynamic dynamically edit fileuploader fill findcontrol flash flv formatdecimal forms formview gridview gudi homeedition iframe iis javascript jquery listbox menu microsoft mouse mssql multistepregistration nameisnotdeclared news objects opera panelmasterpagebuttoncontrols problem redirect registration relationaldatabases reportemail rotatepage schoolproject security serializesmo.table silverlight smartcard smoobjects software sql sql-server sqlserver2005 ssl textbox tracking unauthorized validation vb.net video videos virtualdirectory vista visual-studio visualstudio web webapplications webarchitecture webdevelopemnt webdevelopment webprogramming webservice youareanotmemberofthedebuggerusers





