简体   繁体   中英

414 (Request-Uri Too Long) on azure, Ajax call, data contains URLs to file

I get 414 (Request-Uri Too Long) error for the following ajax call on Azure.

 $.ajax({
            url: "/Test/TestView",
            type:"POST",
            data: JSON.stringify(
            {
                source : 'test',
                FileInfo: FileInfo                    
            }),                
            contentType: "application/json; charset=utf-8",                
            proccessData: false,
            cache: false
        }).done(function (data) {
            $('#body').html(data);
        });

Where FileInfo is array of URL and filename for the file on the server.

Example of FileInfo data:

[{name : "test1",

path : " https://test.blob.core.windows.net/test1-20170831141032-f5a38pbm70831141032-f5a38pbmxuucnlh4suvy8q/003119f4-55c2-4e40-a9d4-9781761c7115/test1.data?sv=2014-02-14&sr=b&sig=V25sQDRCxW%2B5Uuj2s49GhkjkmNbzPiOHEn4U0cpIY3U%3D&st=2017-09-22T13%3A13%3A09Z&se=2017-09-22T13%3A28%3A09Z&sp=r " }]

NOTE: this works on locahost the only difference is that the filepath within the FileInfo array is path of directory "C:\\ProgramData\\Test\\Test.data"

I tried adding enctype: "multipart/form-data" it did not work either.

Please advise. Thanks in advance!

There is a typo in your code. This may cause the issue.

Please change proccessData to processData . More details, see jQuery.ajax() .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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