hello ,
I have a problem with connecting to SQL Server by Windows Authentication.
It's the error:
"Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. "
and this is a source code :
"
SqlConnection cn = new SqlConnection ("Data Source=PLGRZFLS0001;Initial Catalog=Magazyn;Integrated Security=SSPI;Trusted_Connection=Yes");
cn.Open();
SqlCommand cmd = new SqlCommand("exec proc_permission",cn);
SqlDataReader dr= cmd.ExecuteReader() ;
dr.Read();
"
in my web.config :
<authentication mode="Windows" />
<identity impersonate="true"/>
i have no idea what is wrong :(:(
bye,
sorry for my englishlook at
www.connectionStrings.com
and if you need extra help get back to me !!!|||Hello,
Does you MS SQL server require windows or sql authentication for usage?
I suggest you to create sql connection using the Wizards. After you finish , look at the connectionstring and see what u missed up.
HTH
regards
No comments:
Post a Comment