WCF webhttpbinding مع مصادقة مزود العضوية
-
15-11-2019 - |
سؤال
لدي خدمة Webhttpginding تستخدم وضع مصادقة HTTP الأساسي، ولكن بالنسبة لبعض السبب الغريب، فإن التحقق من صحة اسم المستخدم / كلمة المرور ضد حسابات Windows، اعتقدت أنني حددت UsernamepasSwordValidationMode="عضوية Rovider".
وجدت منشورات أخرى تبلغ عن هذه المشكلة أيضا، ولكن لم يتم تقديم إجابة على هذا الموقف. giveacodicetagpre.
المحلول
This configuration will not work. But there are workarounds to this issue:
- Create Login() method and use authentication token, which you pass to every service method.
- Use custom validation mode, and validate username\password by code, using Membership.ValidateUser()
نصائح أخرى
Token passed login or a custom http authentication module.
Here is a link to a custom authentication module. http://custombasicauth.codeplex.com/
For token based, you could use an OAuth implementation.
لا تنتمي إلى StackOverflow