1

I want to connect my application page with the sql server so that I can read the data from the SQL server. TO create the connection string I have used:

string cnn = ConfigurationManager.ConnectionStrings["SharePointFBA"].ConnectionString;

using (SqlConnection conn2 = new SqlConnection(cnn))
{
  cnn.open();
}

But when I execute the code, I get following error:

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON

1 Answer 1

1

In IIS7 on your Windows 2008 Web Server...

Please go to Application Pools.

Select your web site.

Click "Advanced Settings" in the "Actions" panel.

Under "Process Model" select "Identity."

In the popup, select the "Custom account" radio button.

"Set" the account and password to your dbo account name and password that are used on your SQL Server 2008 database.

Save that.

Under sites, go to your website. In the Features View panel, select "Authentication" under IIS. Under ASP.Net Impersonation, make sure it's Disabled

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.