Login failed for user 'myComputer\ASPNET'

  • Thread starter Thread starter trouling
  • Start date Start date
T

trouling

An aspx page I made with a DataGrid and SQLConnection to my local MS
SQL server shows appropriate DB information when view from within the
..NET designer. However, when selecting: "View in Browser", the
following error appears.

Login failed for user 'myComputer\ASPNET'

Selected failing code is:
SqlDataAdapter1.Fill(AuthorsDS1)

Any ideas where I can set the appropriate authentication properties. Is
it in the setup of MS SQL or IIS?
 
re:
Login failed for user 'myComputer\ASPNET'

Is "myComputer\ASPNET" a login name in your SQL Server ?

It seems you are using Windows authentication in SQL Server.

If so, you need to add "myComputer\ASPNET" to the logins for your database.



Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
 
You really haven't provided any useful information so someone can
intelligently help!
IE: connection string.

From your error, i am assuming your db connection string specifies that your
using window integrated security.

Check that you have added the asp.net account to your sql server logins...

Cheers,
Adam
 
The windows identity your app is running under doesn't have credentials to
authenticate in your database. You need to change the identity of the application
(via <processModel> in machine.config) to a user that can authenticate against
your database (perhaps a domain user).

-Brock
DevelopMentor
http://staff.develop.com/ballen
 
On 6 Oct 2005 15:14:02 -0700, (e-mail address removed) wrote:

¤ An aspx page I made with a DataGrid and SQLConnection to my local MS
¤ SQL server shows appropriate DB information when view from within the
¤ .NET designer. However, when selecting: "View in Browser", the
¤ following error appears.
¤
¤ Login failed for user 'myComputer\ASPNET'
¤
¤ Selected failing code is:
¤ SqlDataAdapter1.Fill(AuthorsDS1)
¤
¤ Any ideas where I can set the appropriate authentication properties. Is
¤ it in the setup of MS SQL or IIS?

The answer to this question largely depends upon your configuration. If your ASP.NET app is
configured for Integrated Windows authentication with a local SQL Server database then enabling
impersonation should resolve the problem.

http://msdn.microsoft.com/library/d...-us/cpguide/html/cpconaspnetimpersonation.asp


Paul
~~~~
Microsoft MVP (Visual Basic)
 
Back
Top