Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Posted

Where to do GRANT?

 

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.

Posted

it worked!

 

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...