I wrote a SQL connection program. It works in connecting to the SQL server in the console application program. But when I copied the same code to a web form under button_click event handling, system reported:
"Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection"
Why it works in C# console application while not working in the asp.net web form? They use the same SqlConnection:
new SqlConnection("Initial Catalog=DataMasters; Data Source=Abcdefg ;Integrated Security=SSPI");
And the security has been set up as: Authentication: SQL Server and Winows.
On the startup service account (start and run sql server in the following account) (in security configuration), system administrator selected an account name and a password already though (instead of using system account).
thanks a million,