This is a migrated thread and some comments may be shown as answers.

Ajax binding works in IIS7 but not 6 - 404 error

1 Answer 76 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sheryl Stoller
Top achievements
Rank 1
Sheryl Stoller asked on 30 Jan 2013, 02:49 PM
Hello,

I have the following grid: 

@(Html.Kendo().Grid<JobCodeModel>()
        .Name("JobCodeGrid")
        .ToolBar(toolbar => toolbar.Create())
        .Scrollable(scrolling => scrolling.Enabled(false))
        .Filterable(filtering => filtering.Enabled(true))
        .Pageable(paging => paging.Enabled(true).PageSizes(true))
        .Sortable(sorting => sorting.Enabled(true))
        .Editable(editing => editing.Mode(Kendo.Mvc.UI.GridEditMode.InLine))
        .DataSource(datasource => datasource
            .Ajax()
            .Read(read => read.Action("JobCode_Read", "Admin"))
            .Create(create => create.Action("JobCode_Create", "Admin"))
            .Update(update => update.Action("JobCode_Update", "Admin"))
            .Model(model => model.Id(p => p.JobCodeID))
            )
 
 
 
        .Columns(columns =>
            {
                columns.Bound(c => c.JobCode);
                columns.Bound(c => c.JobCodeDescription);
                columns.Bound(c => c.Active);
 
                columns.Command(commands =>
                    {
                        commands.Edit();
 
                    }).Width(43).Visible(true);
            })
             
       )

[HttpPost]
       public ActionResult JobCode_Read([DataSourceRequest]DataSourceRequest request)
       {
           DataSourceResult result = null;
           using (MyEntities entities = new MyEntities())
           {
               result = (from r in entities.JobCodes
                         select new JobCodeModel
                         {
                             JobCodeID = r.JobCodeID,
                             JobCode = r.JobCode1,
                             JobCodeDescription = r.JobCodeDescription,
                             Active = r.Active
 
                         }).ToDataSourceResult(request);
           }
           return Json(result);
 
       }

And when i deploy the site to IIS6 i get a 404 on JobCode_Read (yes, i have the proper wildcard set up) and the data does not load (obviously).

It also happens if i change this post to a get and return Json(result, JsonRequestBehavior.AllowGet);

When i deploy it to IIS7 it goes through no problem.

Am I missing a setting in II6, or will this just not work in IIS6?

Has anyone else encountered this?

1 Answer, 1 is accepted

Sort by
0
comgiu
Top achievements
Rank 2
answered on 31 Jan 2013, 11:43 AM
hi,
other page in mvc works?

try this

http://blog.stevensanderson.com/2008/07/04/options-for-deploying-aspnet-mvc-to-iis-6/
http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx
Tags
Grid
Asked by
Sheryl Stoller
Top achievements
Rank 1
Answers by
comgiu
Top achievements
Rank 2
Share this question
or