1

I have creates an asp.net mvc 4 web app. I have deployed it to my dev server. (different box than my local on same domain).

Both the database and the website exists on the same server/box. I am trying to connect from my local machine which is on the same domain as the server.

I try to login on the home page and I get this error: Login failed for user 'domain\ServerName'

I don't know where this is coming from or how to resolve it. I assume it has something to do with IIS. Any help would be appreciated.

EB.
  • 2,627
  • 8
  • 35
  • 55
  • Is the server on the same domain as your computer? What browser are you using? If not internet explorer / not on the same subnet, have you enabled NTLM/Kerberos support? – Basic Aug 05 '14 at 21:32
  • Yes same domain. Chrome. How do you enable NTLM/Kerberos support? – EB. Aug 06 '14 at 18:07
  • In firefox, you need to set [network.automatic-ntlm-auth.trusted-uris](http://sivel.net/2007/05/firefox-ntlm-sso/). I can't remember for Chrome but I believe it's based off the internet zone for the site (as defined by the Internet Options in control panel used by IE) – Basic Aug 06 '14 at 18:43

1 Answers1

0

I had this problem - It was my connection string. Somehow, it now magically now had both ;User ID={login value here};Password={password value here} and Trusted_Connection=True; key/value pairs.

You cannot use both. If you have a SQL Server login, then you don't want the Trusted_Connection=True;. If you have a trust between machines, then you don't want the ;User ID={login value here};Password={password value here} values.

It makes sense that this applies to Integrated Security=SSPI; and Integrated Security=true; too. You must leave off User ID and password when you use those as well.

(6 years late, but maybe it'll help someone else)

Paul Sturm
  • 2,118
  • 1
  • 18
  • 23