How will I correct the error generated???

G

Guest

I am a beginner in web developtment in asp.net using visual basic.net. i was trying to access data in SQL 2000 and display it in a datagrid/listbox, but I kept on getting the same message from the browser :
Server Error in '/Sample2' Application.
--------------------------------------------------------------------------------

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

Source Error:


Line 111: ("SELECT Lname FROM Employess", SqlConnection1)
Line 112: Dim drCities As SqlDataReader
Line 113: SqlConnection1.Open()
Line 114: drCities = cmdCities.ExecuteReader()
Line 115: lstcities.DataSource = drCities
 
M

Martin Marinov

YOu have to grant access to the ASPNET user to your database
open you Enterprise Manager
Open your database and click on Users
right click in the right and select New Database User
in the login name select <new> and from the ... button select
7117FHGZ0411\ASPNET
set it to be with windwos authentication, select your database

in your connection string for the database connection you have to set
Integrated Security=True and not set a user name and password so the .net
framework will use the aspnet account as a user in wich context the asp.net
process is running under to connect to the database

Regards
Martin

Denzio said:
I am a beginner in web developtment in asp.net using visual basic.net. i
was trying to access data in SQL 2000 and display it in a datagrid/listbox,
but I kept on getting the same message from the browser :
Server Error in '/Sample2' Application.
-------------------------------------------------------------------------- ------

Login failed for user '7117FHGZ0411\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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top