2019年9月25日 星期三

asp.net webmethod 使用session 做資料交換的問題

實作上跨 webmethod 常常不能取得 System.Web.HttpContext.Current.Session 內的資料
例如在 webmethod1 寫入然後在 webmethod2 讀取時會是null
改用 System.Web.HttpContext.Current.Cache 則ok

沒有留言:

自訂權限驗證機制

// 使用 filter [Route("api/[controller]")] [ApiController] [Authorize] [TypeFilter(typeof(CustomAsyncAuthorizationFilter))] public c...