Login failed for user 'MachineName\ASPNET'

L

Linda

I do not want to use Impersonation, and I do not want to add the ASPNET
user name to the SQL Server user accounts. I want a user to use
windows authentication to log into the site, and then have their own
specific
credentials passed on to SQL Server, which will determine what access
rights that user has to the database.

I have seen this Microsoft article 316989
http://support.microsoft.com/default.aspx?kbid=316989, but it does not
provide a solution that meets my needs. If there is a way to
programmatically override asp.net from providing the MachineName\ASPNET user
to
SQL Server, please tell me!

Cheers,
Jason
 
T

tribal

Linda,

Have you looked at adding the following in your deny
users = "?" in the authorization section of your
web.config file

You can also get the NTLogin information of the logged
in user from User.Identity.Name property

Hope this helps
 
S

S. Justin Gengo

Linda,

If you are using Windows Authentication for the site, why not use
impersonation?

That would solve your problem because it would automatically sync up the
user accounts.

Or is your SQL Server not on the same network?

Really impersonation is the best way, but I do remember a Visual Studio
Magazine article on how to impersonate a user selectively. I think it's what
you need:

www.visualstudiomagazine.com top right of page enter locator + code:
VS0405QA_T

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 
G

Guest

I have the same problem but I got it to work. Following information might
help:


ms-help://MS.MSDNQTR.2003FEB.1033/vbcon/html/vbtskAccessingSQLServerUsingWindowsIntegratedSecurity.htm



Paul
 

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

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top