How I can have a session id in wcf Service

后端 未结 3 1346
一整个雨季
一整个雨季 2020-12-14 13:21

I\'m coding an authentication service that have multiple methods.one of this method is ChangePassword. I want when any body wants to change the password, logon to system bef

3条回答
  •  有刺的猬
    2020-12-14 14:26

    You can activate the ASP.NET compatibility mode in your WCF service, and have all the benefits of ASP.NET sessions and context.

    Add this attribute to your WCF class definition:

    [AspNetCompatibilityRequirements(RequirementsMode =
        AspNetCompatibilityRequirementsMode.Required)]
    

    and in your web.config:

    
      
          
      
    
    

提交回复
热议问题