opening sql connection
I have home compute,which works under windows xp professional.
I installed visual studio.net 2003.When I create Windows Application,bring
to a windows form sqlconnection control,I success to open the connection,but
after I crreate asp.net application,bing webform,sqlconnection to it,run,I
cannot open the connection and get those information:
Server Error in '/WebApplication3' Application.
--------------------------------------------------------------------------------
Login failed for user 'COMPANY-E7C81CF\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
'COMPANY-E7C81CF\ASPNET'.
Source Error:
Line 131: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Line 132: 'Put user code to initialize the page here
Line 133: Me.SqlConnection2.Open()
Line 134: End Sub
Line 135:
Source File: c:\inetpub\wwwroot\WebApplication3\WebForm1.aspx.vb Line: 133
Stack Trace:
[SqlException: Login failed for user 'COMPANY-E7C81CF\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
c:\inetpub\wwwroot\WebApplication3\WebForm1.aspx.vb:133
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET
Version:1.1.4322.2032
What to do?
date: Tue, 6 Feb 2007 01:19:00 -0800
author: unknown