Login failed for user\ASPNET

  • Thread starter Kim Chi via DotNetMonster.com
  • Start date
K

Kim Chi via DotNetMonster.com

I encountered the above-mentioned error when building my webpage. According
to the Microsoft KB on this problem, I have to add a"
trusted_connection=yes" to the connection string and enter a username and
password for SQL server authentication or leave it blank for WIN NT/2000
server.

I am just wondering what this username & password refer to ? I tried with
the logon credentials when I started the computer but it doesn't work.
 
P

Patrick Olurotimi Ige

Are you using Windows Authentication?
then use:-
"Data Source=SQLSERVER;Initial Catalog=DATABASENAME;Integrated
Security=SSPI;"

Hope it helps
Patrick
 
B

Brock Allen

trusted_connection=yes is when you want to use the credentials of the running
application (in this case, the credentials of the running ASP.NET worker
process that hosts ASP.NET) to be those used to authenticate with your database.
This means you need to have setup that user in your database and granted
all the necessary permissions. On Windows 2000 by default this user is the
local ASPNET account. On Windows 2003 this is the Network Service account.

If instead you want to use a different set of credentials to authenticate
with the database, then omit trusted_connection=yes and instead use "user
id=joe;password=somepassword". This will now authenticate using that database
account (not using a windows account).

Which option you choose depends upon how you and your DBA work things out.
As for storing secrets (passwords) it's better to go with the windows authentication
to the database using trusted_connection, but this might mean you'll need
to change what user the ASP.NET worker process runs as.
 
S

swarovski

My machine is using MSDE2000 running on WIN XP. I had tried the code
as suggested to be placed at the "Page_Load" event but the webpage
just did not show after much waiting.

If I want to try using a username and password, how should I create
them since my database is already upsized into the server explorer ?
 

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,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top