使用的FormsAuthenticationTicket,或其他方法限制在WCF访问? [英] Restrict Access in WCF using FormsAuthenticationTicket, or other method?

查看:120
本文介绍了使用的FormsAuthenticationTicket,或其他方法限制在WCF访问?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我见过的解决方案,在那里你可以使用asp.net成员资格限制WCF的访问。(<一个href=\"http://stackoverflow.com/questions/11566182/how-do-i-restrict-access-to-some-methods-in-wcf\">How我限制WCF访问一些方法?)
但我不知道是否有使用的FormsAuthenticationTicket是任何类似。

I've seen solutions where you can restrict access in WCF using the membership in asp.net.(How do I restrict access to some methods in WCF?) But i'm wondering if there is anything similar using the FormsAuthenticationTicket.

我没有在我的网站上配置的成员,和我使用WCF中的FormsAuthenticationTicket和方法登录等等。

I don't have the Membership configured on my site, and i'm using the FormsAuthenticationTicket and methods in WCF to log in and so on.

在WCF的服务未配置为YET使用SSL,因为男人我工作还没买证书低谷我们的托管公司(不知道如果相关)

The WCF-Service is not configured to use SSL YET, because the man i work for have not bought a cert trough our hosting company(don't know if relevant)

最主要的是,我需要保护我的一些方法在我的WCF服务从未经授权的访问,如果那里有另一个更简单的方案,我会喜欢一些投入上,要。

The main thing is that i need to protect my some methods in my WCF-Service from unauthorized access, and if theres another simpler solution i would love some input on that to.

我很新的WCF和整体安全性,但在ASP.NET和C#熟悉。
我会为一些教学答案爱,而不仅仅是一个解决方案或想法

I'm very new to WCF and security overall, but familiar in ASP.NET and C#. I would love for some pedagogical answers, and not just a solution or ideá

更新:
我的解决方案有些Pastebin链接的:

UPDATE: Some pastebin links for my solution:

wcf.svc
http://pastebin.com/S3bTPKaV

WCF webconfig:
http://pastebin.com/Pshf7STz

wcf webconfig: http://pastebin.com/Pshf7STz

客户端Webconfig:
http://pastebin.com/QY9252mB

Client Webconfig: http://pastebin.com/QY9252mB

推荐答案

这是可能的,是常用的 - 你要守护的主体权限要求您的通话

This is possible and is commonly used - you have to guard your calls with the principal permission requirement.

下面是我自己的教程之一

Here is one of tutorials by myself

http://netpl.blogspot.com/2010/04/aspnet-forms-authentication-sharing-for.html

不要让标题误导你,这是不是不仅有关Silverlight但访问WCF服务,它能够携带饼干的任何其他方式。

Don't let the title mislead you, this is not not only about Silverlight but any other way of accessing the WCF service that is capable of carrying cookies.

这篇关于使用的FormsAuthenticationTicket,或其他方法限制在WCF访问?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆