views:

37

answers:

1

I have a an ASP .Net MVC website which works fine when testing locally.

I have put the website onto IIS 7 on our windows server 2008 machine.

The website uses .net membership provider and when I try to login I receive the following error:

Login failed for user ''.

This is the membership connection string:

data source=(local);Integrated Security=SSPI;Initial Catalog=db

The site is running in IIS in its own app pool with managed pipeline set to integrated and its Identity is LocalSystem, and authentication is set to Anonymous authentication.

This is the same as other working sites we have running with .net membership.

Any ideas?

+1  A: 

Login failed for user '' is an error caused by no NT login token for SQL Server to read when you say you're using integrated (windows) authentication. It's nothing to with .net membership provider

So, you have "Integrated Security=SSPI;" but SQL can't read it. This can be caused by:

  • group policy (no network login rights)
  • connecting from non Windows
  • firewalls etc
  • recent password changes in same login changes (out of date token)
  • etc

In this case, I can't think why if Web + SQL are on the same box. I thought it would have been difficult to have no token on the same box. I can tell why why but don't know how to fix it sorry.

Please give us full details of your setup...

gbn