kahvedzic
asked on
Windows authentication on SQL Server 2008 from ASP.NET 4 app
Hi,
I am starting with framework 4 and VS2010 (MS Windows Server 2008 R2 + IIS 7.5). On same server I have SQL Server 2008 which have to access with Windows authentication.
This is my connection string:
<add name="Server" connectionString="Data Source=Server;Initial Catalog=database;Integrate d Security=SSPI" providerName="System.Data. SqlClient" />
I enable only Windows security in IIS Manager-Authentication.
When I try to load aspx page with gridview (only select command) I got this error:
Login failed for user 'IIS APPPOOL\ServiceApp'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlE xception: Login failed for user 'IIS APPPOOL\ServiceApp'.
I have no problem connecting to this server from SQL Server Management Studio with Win Auth.
What else do I have to do to connect to sql server from my app?
Thanks guys.
I am starting with framework 4 and VS2010 (MS Windows Server 2008 R2 + IIS 7.5). On same server I have SQL Server 2008 which have to access with Windows authentication.
This is my connection string:
<add name="Server" connectionString="Data Source=Server;Initial Catalog=database;Integrate
I enable only Windows security in IIS Manager-Authentication.
When I try to load aspx page with gridview (only select command) I got this error:
Login failed for user 'IIS APPPOOL\ServiceApp'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlE
I have no problem connecting to this server from SQL Server Management Studio with Win Auth.
What else do I have to do to connect to sql server from my app?
Thanks guys.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER