more then 25 columns in server side 404 Not Found

more then 25 columns in server side 404 Not Found

pranaysonipranaysoni Posts: 23Questions: 2Answers: 0
edited April 2012 in General
this is my request url

http://www.akarshexports.com/jquerypagemethod.aspx/GetStockData?sEcho=1&iColumns=24&sColumns=&iDisplayStart=0&iDisplayLength=10&mDataProp_0=0&mDataProp_1=1&mDataProp_2=2&mDataProp_3=3&mDataProp_4=4&mDataProp_5=5&mDataProp_6=6&mDataProp_7=7&mDataProp_8=8&mDataProp_9=9&mDataProp_10=10&mDataProp_11=11&mDataProp_12=12&mDataProp_13=13&mDataProp_14=14&mDataProp_15=15&mDataProp_16=16&mDataProp_17=17&mDataProp_18=18&mDataProp_19=19&mDataProp_20=20&mDataProp_21=21&mDataProp_22=22&mDataProp_23=23&sSearch=&bRegex=false&sSearch_0=&bRegex_0=false&bSearchable_0=true&sSearch_1=&bRegex_1=false&bSearchable_1=true&sSearch_2=&bRegex_2=false&bSearchable_2=true&sSearch_3=&bRegex_3=false&bSearchable_3=true&sSearch_4=&bRegex_4=false&bSearchable_4=true&sSearch_5=&bRegex_5=false&bSearchable_5=true&sSearch_6=&bRegex_6=false&bSearchable_6=true&sSearch_7=&bRegex_7=false&bSearchable_7=true&sSearch_8=&bRegex_8=false&bSearchable_8=true&sSearch_9=&bRegex_9=false&bSearchable_9=true&sSearch_10=&bRegex_10=false&bSearchable_10=true&sSearch_11=&bRegex_11=false&bSearchable_11=true&sSearch_12=&bRegex_12=false&bSearchable_12=true&sSearch_13=&bRegex_13=false&bSearchable_13=true&sSearch_14=&bRegex_14=false&bSearchable_14=true&sSearch_15=&bRegex_15=false&bSearchable_15=true&sSearch_16=&bRegex_16=false&bSearchable_16=true&sSearch_17=&bRegex_17=false&bSearchable_17=true&sSearch_18=&bRegex_18=false&bSearchable_18=true&sSearch_19=&bRegex_19=false&bSearchable_19=true&sSearch_20=&bRegex_20=false&bSearchable_20=true&sSearch_21=&bRegex_21=false&bSearchable_21=true&sSearch_22=&bRegex_22=false&bSearchable_22=true&sSearch_23=&bRegex_23=false&bSearchable_23=true&iSortingCols=1&iSortCol_0=0&sSortDir_0=asc&bSortable_0=true&bSortable_1=true&bSortable_2=true&bSortable_3=true&bSortable_4=true&bSortable_5=true&bSortable_6=true&bSortable_7=true&bSortable_8=true&bSortable_9=true&bSortable_10=true&bSortable_11=true&bSortable_12=true&bSortable_13=true&bSortable_14=true&bSortable_15=true&bSortable_16=true&bSortable_17=true&bSortable_18=true&bSortable_19=true&bSortable_20=true&bSortable_21=true&bSortable_22=true&bSortable_23=true&WhereCondi=null


with 20 column work fine but more then 23 column 404 Not Found
i use Asp.net using C# and Asp.net Web Method

Replies

  • koosvdkolkkoosvdkolk Posts: 169Questions: 0Answers: 0
    I think the URL is just too long. There is a limit on the length of the URL...

    You could drastically reduce the length by using shorter variable names

    mDataProp --> mdp
    bSortable_23 --> bs23

    etc.
  • allanallan Posts: 63,810Questions: 1Answers: 10,516 Site admin
    Try using POST rather than GET to get around the issue - can be done with sServerMethod .

    > You could drastically reduce the length by using shorter variable names

    Agreed - I possibly should have done that originally, however it makes the names a lot less understandable which is way I did it the way it is. Unfortunately, for backwards compatibility this isn't likely to change in DataTables core any time soon.

    Allan
  • koosvdkolkkoosvdkolk Posts: 169Questions: 0Answers: 0
    @allan, maybe you could just add the possibility of using shorter names to the code (so without removing the possibility to use long ones)?
  • allanallan Posts: 63,810Questions: 1Answers: 10,516 Site admin
    Yes that is an option - although I think just setting DataTables to use POST rather than GET is probably more immediately accessible. fnServerParams could be used to rewrite the variables if you do want to do that.

    Allan
This discussion has been closed.