Eric 0

Eric 0

  • NA
  • 1
  • 0

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

Jun 23 2006 10:50 AM
I have created the following routine in my Page_load event handler (WEB FORM)

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim ConnStr As String

ConnStr = "data source=BRUDC1; " & _

"database=pubs;integrated security=true"

Dim MySqlConn As New SqlConnection(ConnStr)

MySqlConn.Open()

Try

Dim SQL As String

SQL = "SELECT * FROM authors FOR XML AUTO, XMLDATA"

Dim mySqlCmd As New SqlCommand(SQL, MySqlConn)

Dim MyDS As New DataSet

MyDS.ReadXml(mySqlCmd.ExecuteXmlReader(), _

XmlReadMode.Fragment)

XmlDisplay.DocumentContent = MyDS.GetXml()

Finally

MySqlConn.Close()

End Try

End Sub

When  opening my web form with my browser I get an error message in
subject line.

The security setting on my sql server is set to SQL Server and windows authentication.
IIS and SQL server are running on the same server.
Thanks for any help.