Proposed IIS 7.5 JSON RESULT

  • Sunday, May 13, 2012 7:04 PM
     
      Has Code

    Hi All,

        Good Day!

    I am having a little problem.

    On my  development , I use vs2010,mvc3.

    Coz when i delete i use just a sample.

       [HttpPost]
            public JsonResult DeleteProficiency(int Id)
            {
                PersistResult result = ServiceLocator.Current.GetInstance<IProficiencyService>().DeleteItem(Id);
                return Json(new
                { Success = result.Success, Message = result.Message });
            }

    but when i deploy my application on iis 7.5 windows 7 it throws an error

    HTTP Error 401.2 - Unauthorized

    You are not authorized to view this page due to invalid authentication headers.

    -----------------------------------------------------------------------------------------------------------------------------------------------

    but when i try to edit  a sample data  there is no problem encountered on the live server.

       [HttpPost]         publicActionResult SaveUpdateProficiency(ProficiencyModel model)         {             PersistResult result = ServiceLocator.Current.GetInstance<IProficiencyService>().SaveUpdateItem(model);             if (result.Success)             {                 return Json(new                 { Success = result.Success, Message = result.Message });             }             return Json(new             { Success = false, Message = result.Message });         }

    I know it has something to do with jsonresult. Or something i miss a configuration on the IIS.

    And also when i use a hosting site i never encounter the said error.

    any thoughts?

    best regards,

    jhon

     


    juan


All Replies