Login failed for user 'MyPC\ASPNET'. msg received

  • Thread starter Thread starter Dee
  • Start date Start date
D

Dee

Hi,
I am running sample code from 101 VB.NET. The sample is an ASP.NET porj that
uses SQL Server I added ASPNET user to all the Groups including
Administrator. I don't know why I get this error. I get the message when the
code tries to access sql server: da.Fill(dsProducts).
don't know The Windows Forms part accesse the database fine. Anyone else has
come across this issue?
Thanks.
Dee
 
Have you associated the ASPNET account in SQL Server? SQL Server itself is
saying it doesn't recognize this account trying to access it. In the SQL
Server Enterprise manager, map this account to the SQL Server login or don't
use a trusted connection and use a connection string with a valid SQL Server
user and password embedded instead.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage
 
Thanks Mark, appreciate your help. :-)
Dee

Mark Fitzpatrick said:
Have you associated the ASPNET account in SQL Server? SQL Server itself is
saying it doesn't recognize this account trying to access it. In the SQL
Server Enterprise manager, map this account to the SQL Server login or don't
use a trusted connection and use a connection string with a valid SQL Server
user and password embedded instead.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage
 
Solution for your problem:

in Web.config file use this>
<authorization>
<deny users="?" />
</authorization>
<identity impersonate="true" />

it should work...
 
Thanks Newton.

Newton said:
Solution for your problem:

in Web.config file use this>
<authorization>
<deny users="?" />
</authorization>
<identity impersonate="true" />

it should work...
 

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

Back
Top