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

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -