datatables.aspnet icon indicating copy to clipboard operation
datatables.aspnet copied to clipboard

request null when using asp.net webform with webapi

Open sgashua opened this issue 8 years ago • 4 comments

I created project that uses webform with webapi. I copied your webapi sample. when page loads, webapi function is called but request is null. how to solve?

sgashua avatar Jan 24 '17 01:01 sgashua

Seems that there's a problem with the request itself. Might be missing something. Can you copy/paste it's content here? Please, consider using Fiddler to catch the request content.

ALMMa avatar Jan 24 '17 09:01 ALMMa

webapi.txt

request is null in this function public JsonResult<IDataTablesResponse> Get(IDataTablesRequest request)

sgashua avatar Jan 25 '17 03:01 sgashua

I had this problem because I forgot to register the data table configuration in the global asax. @sgtagan, make sure you add the following code to your global: GlobalConfiguration.Configuration.RegisterDataTables();

jdevx avatar Feb 10 '17 03:02 jdevx

Even after adding the global configuration to global.asax it still does not work. I am using autofac is there a way to setup datatables on that? I am getting request as null

jase-ek avatar Feb 15 '22 09:02 jase-ek