Thursday, February 16, 2012

ASP.NET Web application, problem connecting to database

Hi,

I have a problem connecting to database using windows authorization.

this is sample code
SqlConnection oSQLConn = new SqlConnection();
oSQLConn.ConnectionString="integrated security=SSPI;Server=SHAREPOINT\\EPM;Database=STS_sharepoint_1;Trusted_Connection=true;";
oSQLConn.Open();
on Windows Aplication it work good but on ASP.NET Web application I got an Server Error - Login failed for user *****************
is it problem with IIS configuration?

Make sure there is a user account for <machinename>/ASPNET and also the account has permissions on the objects.|||

Where can I check it? in ASP.Net configuration or in IIS configuration?

Greetz

|||In Sql Server under users under the database you are working on in Enterprise Manager
|||There is "My Domain\Domain Users" and still it don't work:/ I'm running asp script from computer in My Domain.

No comments:

Post a Comment