Saturday, March 24, 2012

Login failed for user\ASPNET

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.
Message posted via http://www.webservertalk.comAre you using Windows Authentication?
then use:-
"Data Source=SQLSERVER;Initial Catalog=DATABASENAME;Integrated
Security=SSPI;"
Hope it helps
Patrick
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!
trusted_connection=yes is when you want to use the credentials of the runnin
g
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 datab
ase.
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 databas
e
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 authen
tication
to the database using trusted_connection, but this might mean you'll need
to change what user the ASP.NET worker process runs as.
-Brock
DevelopMentor
http://staff.develop.com/ballen

> 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.
>
Trusted connection indicates that you are using a Windows/AD account to
connect. If you'd like to use such an account, you will need to run ASP.NET
in such user context, using impersonation.
http://www.dnzone.com/ShowDetail.asp?NewsId=504
Manohar Kamath
Editor, .netWire
www.dotnetwire.com
"Kim Chi via webservertalk.com" <forum@.webservertalk.com> wrote in message
news:65e894c98cd0449e920bd19df000204c@.Do
webservertalk.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.
> --
> Message posted via http://www.webservertalk.com

0 comments:

Post a Comment