Re: DB connection problem in attemp to load DataGrid from SQLServer DB

From: Richard Lionheart (NoOne_at_Nowhere.net)
Date: 09/14/05


Date: Tue, 13 Sep 2005 21:04:20 -0400

Hi Dan,

> Right-click on the server in EM, select properties and then click the
> Security tab.

Thanks. But I've still got my main connection problem, which is echoed
below from the previous post. If you have the time, I'd appreciate more
guidance about how to get this to work.

I tried two things to get around the new symptom I got, which is displayed
below:

1. Added ASPNET as a login with no server roles but database access to
MyComics in roles public & db_datareader/writer.

2. I addition, I set security to *both* NT and SQLServer.

============
Login failed for user 'ASCI2G-WS2\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
'ASCI2G-WS2\ASPNET'.

Source Error:

Line 73: "server=ASCI2G-WS2;database=mycomics;Integrated
Security=SSPI");
Line 74: DataSet ds = new DataSet ();
Line 75: adapter.Fill (ds);
Line 76: MyDataGrid.DataSource = ds;
Line 77: MyDataGrid.DataBind ();

Source File: f:\inetpub\wwwroot\DataGrid-Prosise.Comics.aspx Line: 75
============