hello
I use ASP.NET with SQL server 2000, hava a problem when I try to open the connection to my database which is in a sql server 2000
The Error is:
Server Error in '/TrainingSystem' Application.
--------------------------------------------------------------------------------
Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection.
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 'sa'. Reason: Not associated with a trusted SQL Server connection.
Source Error:
Line 24: Private Sub OpenConnection()
Line 25: Cn = New SqlConnection(ConfigurationSettings.AppSettings("OpenDB"))
Line 26: Cn.Open()
Line 27: 'Try
Line 28: ' Cn.Open()
---------------------------------------------------------
I am using ASP.Net with VB script
This code is on the
web.config file
<appSettings>
<add key="OpenDB" value="Server=localhost;uid=sa;pwd=;database=TSdatabase;"></add>
<!-- DYNAMIC INTRANET SETTING Set IsIntranet value="true" to insert is Student option in user Administration -->
<add key="isIntranet" value="false"></add>
</appSettings>
On the
VB file I have this code:
Public Cn As New SqlConnection()
Private Sub OpenConnection()
Cn = New SqlConnection(ConfigurationSettings.AppSettings("OpenDB"))
Cn.Open()
End Sup
and I call it in the sub Page_Load
Thx
Pls help me
I can not Find the error


