Hello,
I just recently started with nHibernate and got a nice project running at home. Now I tried to get it working at work, I received the following error :
Code:
nHibernateTestApp.Tests.GenerateSchema_Fixture.CanGenerateSchema:
NHibernate.HibernateException : Login failed for user 'xxxx\xxxx'.
----> System.Data.SqlClient.SqlException : Login failed for user 'xxxx\xxxx'.
I am logging on with Windows Authentication cause thats how we work :) I also changed the username appropriately ofcourse and the password should be empty. Let's just assume SQL Authentication is not an option. What do I change in my connection string? At the moment the format is (I am using SQL Server 2005) :
Code:
<property name="connection.connection_string">
Server=DOMAIN\SERVERNAME;Initial Catalog=DBNAME;User Id=DOMAIN\USERNAME
</property>
Also, is it possible to use nHibernate with another protocol than Named Pipes (it is also not available...), like TCP/IP for example?
Thanks in advance.
Edit : Perhaps I was too fast - I just got home and tried without Named Pipes and it worked fine. Am I doing something wrong with the username/password combination..?
Update : Pah, problem solved - and I do feel kinda dumb for it. I completely forgot there's a thing called
Code:
Integrated Security=SSPI
Sigh.