简体   繁体   English

jQuery ajax post方法在iis7中不起作用

[英]jquery ajax post method not work in iis7

I have problem with ajax call in IIS 7 in MVC , i use jquery ajax like this: 我在MVC的IIS 7中遇到ajax调用问题,我使用jquery ajax这样:

   $.ajax({
      url: '@Url.Action("IsLoanNumberValid", "File")',
      type: 'Post',
      cache: false,
      data: {   
            fileCategoryId: ddlFileCategory.value(),
        loanNumber: $("#txtLoanNumber").val(),
       }
   .....} 

i don't have any problem when i develop application but when i publish mvc application and upload in iis post method have problem and do not return result , 开发应用程序时我没有任何问题,但是当我发布mvc应用程序并在iis post方法中上传时出现问题,并且不返回结果,

this is requests in firebug design time 这是萤火虫设计时的要求 这是萤火虫设计时的要求

this is request when application is in iis7 当应用程序在iis7中时,这是请求

在此处输入图片说明

all of ajax post method can not return result 所有的ajax post方法都无法返回结果

also FilterFiles_Read method that Called by Kendo grid have problem in post method! Kendo网格调用的FilterFiles_Read方法在post方法中也有问题! grid binds by this line of code : .Read(read => read.Action("FilterFiles_Read","File") 网格通过以下代码行绑定: .Read(read => read.Action(“ FilterFiles_Read”,“ File”)

this is its code 这是它的代码

@(Html.Kendo().Grid<CommonData.Domain.File>()
    .Name("Grid")
    .Pageable()
    .EnableCustomBinding(true) 
    .Columns(columns =>
    {
    columns.Bound(e => e.FileCategory.Title);
    columns.Bound(e => e.BankFileNo);
    })
    .DataSource(dataSource => dataSource
    .Ajax()
    .Model(model => model.Id(o => o.Id))
    .Read(read => read.Action("FilterFiles_Read","File").Data("GetValues"))
    .PageSize(10)
        .Total(TempData["Total"] == null ? 0 : (int)TempData["Total"])
    )
)

Do i must configure iis or must change applicaion? 我必须配置iis还是必须更改应用程序? please help me 请帮我

@zeinab kalanaki, Do you still have problem? @zeinab kalanaki,你还有问题吗? The solution in following ASP.Net MVC $.Ajax() function not working when hosted in IIS7 helped me fixed mine. 当托管在IIS7中时 ,以下ASP.Net MVC $ .Ajax()函数中的解决方案无法解决我的问题。 Try amending your url to 尝试将您的网址修改为

url: '@Url.Action("IsLoanNumberValid", "File")/',

Notice the added '/' at the end. 注意最后添加的“ /”。 seems like a bug to me. 对我来说似乎是个虫子。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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