error in server explorer in asp.net

anat2403

Newcomer
Joined
Dec 14, 2005
Messages
4
I create an asp.net project. through the server explorer I drag the author table from pubs database.
My server name is called ANAT2005.
through the sqldataadapter I generate dataset.
I put in my page a button and a datagrid, put 2 lines in code in button_click:

sqldataadapter.fill(dataSet11);
datagrid1.databind();

I enter the appropriate datasource and datamember in the properties of datagrid and when I view in browser I get the following error:
I installed the dotnet and sqlserver in this computer only few days ago.
In an older computer I don't have the problem.

Server Error in '/WebApp6' Application.
--------------------------------------------------------------------------------

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

Source Error:


Line 150: private void Button1_Click(object sender, System.EventArgs e)
Line 151: {
Line 152: sqlDataAdapter1.Fill(dataSet11);
Line 153: DataGrid1.DataBind();
Line 154: }


Source File: c:\inetpub\wwwroot\webapp6\webform1.aspx.cs Line: 152
 
Where to do GRANT?

PlausiblyDamp said:
You will need to grant the user account ANAT2005\ASPNET permission to access the SQL database.


Where do I make this GRANT?
in sql server?
in server explorer in the VS dot net?
in file explorer?
where and how?
The GRANT is not in ORACLE?
I look for solution in sql server 2000.
Thankyou.
 
it worked!

PlausiblyDamp said:
You need to grant the permissions to the SQL Server database either via Enterprise manager or through T-SQL.
The two commands are GRANT and sp_grantlogin


ThankYou very much. It finally worked. My server name is ANAT2005 and I undestand that the ASPNET is a name that is added by the dot net?
So it wasn't recognized?
Thanks again.
 
Back
Top