Sunday, February 12, 2012

Connect to SQL with NT authentication from form...

I have a login page that checks the given userid/password against ADSI and redirects the user if successful. My problem seems to come when I try to connect to the SQL database with the user's NT credentials. I have the user's NT account setup in SQL, have anony. disabled in IIS, using Integrated Windows Security in IIS, and am using the following connection string:

connectionString = "data source=SqlServer;initial catalog=pubs;Trusted_Connection=Yes"

I also have this entry in my Web.Config file: <identity impersonate="true" /
Actually, it seems to connect OK, but I can not select any data. I just receive "Select permission denied..." errors even though the user has been given these permissions in SQL.

Any advice would be greatly appreciated.

Thanks,
-BenYou need to set the proper access rights in for the User in SQL Server itself.|||The user has all the proper permissions on the SQL server.

No comments:

Post a Comment