帮朋友贴的:为什么我不能通过proxy访问本地数据库?


下面两行程序在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哪里不对了?搞死了~~
--

所有跟帖: 

回复:有一个问题... -121919- 给 121919 发送悄悄话 (258 bytes) () 01/04/2006 postreply 07:42:47

回复:回复:有一个问题... -129158- 给 129158 发送悄悄话 (91 bytes) () 01/04/2006 postreply 09:13:45

钟钟,就听他的试验一下! -The挨踢Guy- 给 The挨踢Guy 发送悄悄话 (0 bytes) () 01/04/2006 postreply 12:05:20

请您先登陆,再发跟帖!