如何在 .net 核心中增加 ajax 数据 post 限制

How to increase ajax data post limit in .net core

在.net core web应用中,当ajax post数据较大时,ajax post会抛出404错误。有没有可能通过增加限制来通过 ajax 发送更多数据。数据较少时支持相同 ajax 代码

    $.ajax({
        url: '/addnewrelease',
        dataType: 'json',
        type: "GET",
        timeout: validationMessages.timeoutCount,
        data: {
            'releaseName': releaseName.value,
            'productId': productId,
            'startDate': startDate.value,
            'releaseDate': endDate.value,
            'codeFreeze': codeFreeze.value,
            'duration': duration.value,
            'releaseType': type,
            'releaseVersion': version.value,
            'releaseTemplate': template,
            'phases': phases
        },

改变

type: "GET"

type: "POST"