I have SqlServer loaded on my w2k system. The freeby I just downloaded
from MS.
Within WebMatrix I created a database. called it "WebMatrix"
In WebMatrix I connect to the database.
server: (local)
Windows authentication
Database: WebMatrix
all of my web matrix .aspx pages use the following connection string:
myConnection = New SqlConnection(
"Server='abit64 ';trusted_conne ction=true; database='WebMa trix'" )
The problem is when I use the IIS server on my w2k PC instead of web
matrix.
http://localhost/viewGuestBookGrid.aspx
I get the following error:
Server Error in '/' Application.
--------------------------------------------------------------------
Login failed for user 'ABIT64\ASPNET' .
The full page that fails follows. I am very confused.
How do I get into SQLServer and config user names and passwords? I
tried to use the system administrator login. no luck. Like I said
before, I have the freeby version that I downloaded from the WebMatrix
sit.
The basic question is why does my sql server connecting code work
using the WebMatrix server and not the IIS server?
thanks,
-Steve
<%@ Page Language="VB" %>
<%@ import Namespace="Syst em.Data" %>
<%@ import Namespace="Syst em.Data.SqlClie nt" %>
<script runat="server">
sub Page_Load
dim myConnection as SqlConnection
dim myCommand as SqlCommand
myConnection = New SqlConnection(
"Server='abit64 ';trusted_conne ction=true; database='WebMa trix'" )
myCommand = New SqlCommand( "Select * from Guestbook",
myConnection )
myConnection.Op en( )
myDataGrid.Data Source = myCommand.Execu teReader( )
myDataGrid.Data Bind( )
myConnection.Cl ose( )
end Sub
</script>
<html>
<head>
<title>View the Guestbook</title>
</head>
<body>
<form runat="server">
<p>
<asp:DataGrid id="myDataGrid "
runat="server"> </asp:DataGrid>
</p>
</form>
</body>
</html>