tungdt
August 29th, 2004, 03:46 AM
Hi everyone,
I am using Windows XP, Microsoft SQL Server 200 and Visual Studio.NET.
When I connect to Database in Microsoft SQL 200 in ASP.NET ( inside Visual Basic.NET )...I encountered an error as listed below:
My server name is: DB.
Thanks for your help.
Looking forward to hearing any comments.
Me.SqlConnection1.ConnectionString = "workstation id=DB;packet size=4096;integrated security=SSPI;data source=" & _
"DB;persist security info=False;initial catalog=Northwind"
SqlConnection1.Open()
SqlDataAdapter1.SelectCommand.ExecuteNonQuery()
SqlDataAdapter1.Fill(DataSet1)
---------------------------------------------------------------
Server Error in '/VB/WebApplication3' Application.
--------------------------------------------------------------------------------
Login failed for user 'DB\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 'DB\ASPNET'.
Source Error:
Line 155: 'Put user code to initialize the page here
Line 156:
Line 157: SqlConnection1.Open()
Line 158: SqlDataAdapter1.SelectCommand.ExecuteNonQuery()
Line 159: SqlDataAdapter1.Fill(DataSet1)
Source File: F:\Visual Studio.net\ASP.NET\WebApplication3\WebForm1.aspx.vb Line: 157
Stack Trace:
[SqlException: Login failed for user 'DB\ASPNET'.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction)
System.Data.SqlClient.SqlConnection.Open()
WebApplication3.WebForm1.Page_Load(Object sender, EventArgs e) in F:\Visual Studio.net\ASP.NET\WebApplication3\WebForm1.aspx.vb:157
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
I am using Windows XP, Microsoft SQL Server 200 and Visual Studio.NET.
When I connect to Database in Microsoft SQL 200 in ASP.NET ( inside Visual Basic.NET )...I encountered an error as listed below:
My server name is: DB.
Thanks for your help.
Looking forward to hearing any comments.
Me.SqlConnection1.ConnectionString = "workstation id=DB;packet size=4096;integrated security=SSPI;data source=" & _
"DB;persist security info=False;initial catalog=Northwind"
SqlConnection1.Open()
SqlDataAdapter1.SelectCommand.ExecuteNonQuery()
SqlDataAdapter1.Fill(DataSet1)
---------------------------------------------------------------
Server Error in '/VB/WebApplication3' Application.
--------------------------------------------------------------------------------
Login failed for user 'DB\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 'DB\ASPNET'.
Source Error:
Line 155: 'Put user code to initialize the page here
Line 156:
Line 157: SqlConnection1.Open()
Line 158: SqlDataAdapter1.SelectCommand.ExecuteNonQuery()
Line 159: SqlDataAdapter1.Fill(DataSet1)
Source File: F:\Visual Studio.net\ASP.NET\WebApplication3\WebForm1.aspx.vb Line: 157
Stack Trace:
[SqlException: Login failed for user 'DB\ASPNET'.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction)
System.Data.SqlClient.SqlConnection.Open()
WebApplication3.WebForm1.Page_Load(Object sender, EventArgs e) in F:\Visual Studio.net\ASP.NET\WebApplication3\WebForm1.aspx.vb:157
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573