【发布时间】:2015-10-10 07:42:53
【问题描述】:
我已经启动并运行了一项移动服务,但是当我发布时突然有一个功能停止更新,并且我没有收到任何错误。除了我想联系它的时候。
函数的代码是:
[Route("api/Game/GetCurGame")]
[AuthorizeLevel(AuthorizationLevel.User)]
public async Task<IHttpActionResult> GetCurGame(DTO.returnGameFoundData search)
{
Services.Log.Info("GetCurGame Function");
using (Db db = new Db())
{
try
{
DTO.returnGameFoundData ret = new DTO.returnGameFoundData() { playersTurn = true, gameID = search.gameID, NavigationParameter = 1 };
//Services.Log.Info("GetCurGame Function");
return Ok(ret);
}
catch(Exception)
{
DTO.returnGameFoundData ret = new DTO.returnGameFoundData() { playersTurn = false, gameID = search.gameID, NavigationParameter = -1 };
return Ok(ret);
}
}
}
在日志中非常简单,我只得到/得到: 在我的客户端(windows phone 8.1)上出现错误:
方法不允许。
不知道错误我更改了代码,添加了更多日志,并将第一个日志更改为“AWESOME”。发布移动服务,成功,并获得笑脸移动服务运行。
但是,日志是一样的,错误也是一样的。尽管我将日志代码Services.Log.Info("GetCurGame Function"); 更改为Services.Log.Info("AWESOME");。
我在这里错过了什么?
【问题讨论】:
标签: .net azure windows-phone-8 windows-phone-8.1 azure-mobile-services