The挨踢Guy2006-01-04 14:42:12

下面两行程序在console application上运行成功,但在web service proxy里面却不行。
为什么?

SqlConnection ucidConn = new SqlConnection("Data Source=localhost\\MYSQLENGINE
; database=xxx; Integrated Security=SSPI;Initial Catalog=xxx");
ucidConn.Open();

in proxy: (suppose above codes is class A method B)
[WebMethod]
a = new A();
a.B()

结果抛出异常:
System.Data.SqlClient.SqlException: Login failed for user 'ItIsMe'.

如果用管理员账户,即用uid=sa;pwd=;代替Integrated Security=SSPI,则是:
System.Data.SqlClient.SqlException: Login failed for user 'sa'. Reason: Not
associated with a trusted SQL Server connection.

而且将来deploy时并不想用sa,而用用户自己的credential校验。
上面code或configurations哪里不对了?搞死了~~
--

1219192006-01-04 15:42:47
回复:有一个问题...
1291582006-01-04 17:13:45
回复:回复:有一个问题...
The挨踢Guy2006-01-04 20:05:20
钟钟,就听他的试验一下!