2017年9月13日 星期三

透過 $http.post 傳遞參數到 server 出現訊息 : JSON 要求太長,無法還原序列化

通常是因為傳遞陣列時,陣列元素總數超過預設上限300,可透過以下方式加大上限
於 web.config 中加入
<add key="aspnet:MaxJsonDeserializerMembers" value="30000" />

沒有留言:

自訂權限驗證機制

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