简体   繁体   English

ExtJS Ajax请求参数未传递到服务器

[英]ExtJS Ajax Request params not making it to server

I have some ExtJS that isn't behaving as expected. 我有一些ExtJS表现不正常。 The request (see below) sets the params correctly and have been verified with the FireFox network tool as being in the form data. 该请求(请参阅下文)正确设置了参数,并已通过FireFox网络工具验证为表单数据中的形式。 The problem arises on the server end. 该问题出现在服务器端。 The server (IIS) doesn't show the parameters in the resulting HttpRequest object. 服务器(IIS)在结果HttpRequest对象中不显示参数。

 Ext.Ajax.request(
{
    url: this.url,
    params: { note: this.currentNote.data.Note, noteId: this.currentNote.data.NoteId, forceClose: doClose },
    method: 'POST',
    scope: this,
    success: function(response, options)
    {
        var result = Ext.decode(response.responseText);
        if (result)
        {
            ... Do Stuff ...
        }
    },
    failure: function()
    {
        this.getEl().unmask();
        Ext.Msg.alert('Note was NOT saved', "Note was NOT saved.");
    }
});

As indicated above, the HttpRequest.Params object does NOT contain note, noteId, or forceClose. 如上所述,HttpRequest.Params对象不包含note,noteId或forceClose。 It does, however, contain the query string items that are attached to the URL. 但是,它确实包含附加到URL的查询字符串项。

I have no idea but it might be request filter problem. 我不知道,但可能是request filter问题。

IIS Request Filtering IIS请求过滤

  1. On the taskbar, click Start, point to Administrative Tools, and then click Server Manager. 在任务栏上,单击“开始”,指向“管理工具”,然后单击“服务器管理器”。
  2. In the Server Manager hierarchy pane, expand Roles, and then click Web Server (IIS). 在“服务器管理器”层次结构窗格中,展开“角色”,然后单击“ Web服务器(IIS)”。
  3. In the Web Server (IIS) pane, scroll to the Role Services section, and then click Add Role Services. 在“ Web服务器(IIS)”窗格中,滚动到“角色服务”部分,然后单击“添加角色服务”。
  4. On the Select Role Services page of the Add Role Services Wizard, select Request Filtering, and then click Next. 在“添加角色服务向导”的“选择角色服务”页上,选择“请求筛选”,然后单击“下一步”。

在此处输入图片说明
5. On the Confirm Installation Selections page, click Install. 5.在“确认安装选择”页面上,单击“安装”。
6. On the Results page, click Close. 6.在结果页面上,单击关闭。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM