asp.net mvc - Can WebSecurity work in WCF services? -
i new in simplemembership model. websecurity works fine in web pages, have problems when use in services.
i have web services, working under:
<binding name="securebasicbindingwithmembershipconfig"> <security mode="transportwithmessagecredential"> <transport clientcredentialtype="none" /> <message clientcredentialtype="username" /> </security> </binding>
i try recover user id web service.
if use websecurity.isauthenticated
, returns isauthenticated = 'webmatrix.webdata.websecurity.isauthenticated' threw exception of type 'system.argumentnullexception'
however, using system.web.security.membership.getuser()
user id correctly returned.
can websecurity used within wcf service or doing wrong?
Comments
Post a Comment