c# - Why https request via ajax not working every time but its working fine on local -


i working on dotnetnuke , facing strange problem. when test locally site working fine...but go live secure https server enable ajax request handler not working every time .some times working fine of times showing object reference error same request. don't know how fix .i totally confused because times same request same process working time showing object reference error , session got expire. because of https ?.......

here jquery script

$("#btnaddexhibitationdate").click(function () {

    if ($("[id*=datetimepickerselect]").val().length != 0) {         showprogressbar();        // alert($("[id*=datetimepickerselect]").val() + "," + $("[id*=hdnculturtwoletterisocode]").val());         var response = $.post('/desktopmodules/testproject/entities/bookingfolder/bookinghandler.ashx',                 { action: "addexhibitiondate", date: $("[id*=datetimepickerselect]").val(), languagetag: $("[id*=hdnculturtwoletterisocode]").val() },                 function (result) {                     hideprogressbar();                     var val = result.split("##");                     if (val.length == 2) {                         $("#exhibitaiondatecontainer").append(createxhibitationdatelist(val[0], val[1]));                         $("#exhibitaiondatecontainer").removeattr("style");                     }                     else {                         //dupicate entry found                         alert(result);                     }                  });         response.error(function (error) {             hideprogressbar();            // alert(error.d);             alert(getlblerrormsg());         });     }  }); 

and here code on handler

try {

                string date = convert.tostring(context.request["date"]);                 ordertitles ob = (ordertitles)context.session["moviebooking"];                 int counter = 0;                 exhibitiondates edt = new exhibitiondates();                  //cultureinfo obj = new cultureinfo("india");                  cultureinfo obj1 = new cultureinfo(context.request["languagetag"].tostring());                edt.edate = datetime.parse(date, obj1);                 //  edt.edate = convert.todatetime(date);                  counter = common.getselectedtitleindex(ob);                 if (ob.mtitles[counter].mfacilities.count == 0)                 {                     facilities objbf = new facilities();                     objbf.facilityname = "";                     objbf.facilitycity = "";                     objbf.mexhibitiondates = new list<exhibitiondates>();                     ob.mtitles[counter].mfacilities.add(objbf);                     ob.mtitles[counter].mfacilities[0].mexhibitiondates.add(edt);                     context.session["moviebooking"] = ob;                     context.response.write(date + "##" + common.getformateddate(edt.edate, context.request["languagetag"].tostring()));                     // context.response.write(date + "##" + date);                  }                 else                 {                     if (!ob.mtitles[counter].mfacilities[0].mexhibitiondates.contains(edt))                     {                         ob.mtitles[counter].mfacilities[0].mexhibitiondates.add(edt);                         context.session["moviebooking"] = ob;                         context.response.write(date + "##" + common.getformateddate(edt.edate, context.request["languagetag"].tostring()));                     }                     else                     {                         context.response.write("selected date alrady in list.");                     }                  }             }             catch (exception ex)             {                  context.response.write(ex.message.tostring());              } 


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -