开发者

How Do I Configure SQL Server Security for a WCF Service?

I'm learning WCF. I've created a WCF service w开发者_运维百科hich uses a local SQL Server database. I've configured the database server to use Windows authentication. When I use the WCF service with a WPF application, everything works.

When I use the WCF service with a WPF browser application, however, I get an error which, I believe, means I don't have security configured properly. The specific error is: "That assembly does not allow partially trusted callers."

I'm trying to figure out how to configure the security properly, starting with the security in SQL Server, but I'm having trouble finding answers. Can anyone help me with these questions?

1) Do I need to reconfigure SQL Server to use SQL Server authentication instead of Windows authentication? If so, are there recommended guidelines for naming the user and configuring the privileges of the account created for the WCF service?

2) The database is on the local machine now only so I can experiment. Down the road, I'm going to move the database to a server. Will the security configuration required by WCF change when I do that?

-TC


do you host your WCF in IIS (which version) or self hosted? If IIS then probably need to run IIS it in Full Trust mode

try not to use SQL Server Authentication if you don't have to.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜