WCF-> IIS 7.0 部分信任托管 (.svc) ->基本HttpBinding ->身份验证(用户名/密码)-> ASP.NET 会员提供商 ->无 SSL
基本上我的要求是:
- WCF 服务应用程序托管在 IIS 7.0 上,部分信任
- 端点通过 BasicHttpBinding 公开
- 希望启用基本身份验证(用户名/密码)
- 希望使用 ASP.NET 成员资格进行用户身份验证
- 我不想设置 SSL
我看过一些教程,但他们谈论的是首先启用 SSL。我能够创建示例 WCF 服务,并且主机位于 IIS 7.0 上且部分信任,没有任何问题。这只是我正在努力解决的身份验证部分。
任何人都可以提供任何帮助或指出我可以找到相关信息的地方吗?
Basically my requirement is:
- WCF Service Application Hosted on IIS 7.0 with Partial Trust
- Endpoint exposed with BasicHttpBinding
- Would like to enable basic Authentication (UserName / Password)
- Would like to use ASP.NET membership for User Authentication
- I don't want to setup SSL
I have seen some tutorials but they are talking about first enabling the SSL. I am able to create my sample WCF Service and Host is on IIS 7.0 with Partial Trust without any problem. Its just the Authentication part that I am struggling with.
Can anyone provide any assistance or point me to the place where relevant information can be found?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您在没有 ssl 的情况下通过 basichttpbinding 使用用户名/密码,则密码将以未加密的方式通过网络。
我建议您在这种情况下使用 SSL。
是的,您可以通过 asp.net 会员资格提供商使用基本身份验证,请参阅:
http://custombasicauth.codeplex.com/< /a>
If you are using username / password over basichttpbinding without ssl, then the password is going over the network unencrypted.
I would recomend that you use SSL in this situation.
Yes you can use basic authenication with an asp.net membership provider, see:
http://custombasicauth.codeplex.com/
事实上,在过去的三个月里,我一直在为这个设置而苦苦挣扎。事实证明,这种组合实际上行不通。有关该主题的大多数站点/博客都涉及与 ASP 会员资格的连接以进行登录和创建用户上下文。这确实工作得很好;甚至通过 SSL。但是,当您尝试使用具有权限属性的 wcf 服务并通过 basicHTTPBinding 与它们通信时,它不起作用。用户上下文不随方法调用一起发送。与我交谈过的大多数人都建议我使用 REST 风格的服务而不是 WCF。
看看这篇文章。
http://www.learn-silverlight-tutorial.com/SecuringSilverlightApplications.cfm
Actually, I have struggled with this setup over the last 3 months. Turns out this combination will not actually work. Most sites/blogs on the topic deal with making the connection to asp memebership for login and creation of the user context. This does work fine; even over SSL. But when you try to use wcf services with permission attributes and communicate witht them over basicHTTPBinding, it doesn't work. The user context is not sent with the method call. Most people i've talked to have pointed me towards using REST style services instead of WCF.
check out this article.
http://www.learn-silverlight-tutorial.com/SecuringSilverlightApplications.cfm