IIS 7.5 JSON结果 [英] IIS 7.5 JSON RESULT
问题描述
大家好,
美好的一天!
Good Day!
我有一点问题。
关于我的 开发,我使用vs2010,mvc3。
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错误401.2 - 未经授权
由于身份验证标头无效,您无权查看此页面。
- -------------------------------------------------- -------------------------------------------------- ------------------------------------------
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 });
}
我知道它与jsonresult有关。或者我错过了IIS上的配置。
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.
有什么想法吗?
最好的问候,
jhon
any thoughts?
best regards,
jhon
juan
推荐答案
这是一个问题关于IIS / ASP.net,您可能会在
IIS Fourm / Asp.net 而不是.NET开发论坛。
This is a question about IIS/ASP.net , you may have more luck getting answers in the IIS Fourm /Asp.net rather than the .NET Development Forums.
祝你有愉快的一天!
这篇关于IIS 7.5 JSON结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!