Login failed for user 'machinename\ASPNET'.

J

Jon Paal

how does this get resolved ???

"Cannot open user default database. Login failed.
Login failed for user 'machinename\ASPNET'. "
 
M

Mark Fitzpatrick

You either grant the ASPNET user account access to the SQL database (which I
don't like to do) or you can use a connectionstring that is not set to use a
trusted connection so you can pass it a sql login username and password.
 
M

mc

Mark said:
You either grant the ASPNET user account access to the SQL database (which I
don't like to do) or you can use a connectionstring that is not set to use a
trusted connection so you can pass it a sql login username and password.
If your deploying to an intranet you could also consider impersonation
 
S

Steve B.

Create an application pool in IIS with a specific account. Set your
application to use this app pool and give acess to this user to the SQL
Server db. In this scenario, you will be able to control the behaviour of
your web app, and you won't have to provide any apssword in the web.config
file.


Steve
 
J

Juan T. Llibre

re:
Create an application pool in IIS with a specific account.

He can't do that, Steve.

He's using IIS 5 or 5.1 if his default ASP.NET account is ASPNET,
and neither of those use Application pools. Only IIS 6.0 uses App Pools.

Mark's suggestion will work for Jon.
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top