MobileService Publish不会更改Mobileservice

时间:2015-10-10 07:42:54

标签: .net azure windows-phone-8 windows-phone-8.1 azure-mobile-services

我有一个移动服务启动并运行,但突然有一个功能在我发布时停止了更新,我没有得到任何错误。除了我想联系它。

该功能的代码是:

[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);
            }
        }
    }

在日志中非常简单我只得到/得到: enter image description here 在我的客户端(Windows Phone 8.1)上我收到错误:

  

不允许使用方法。

不知道错误我更改了代码,使用了更多日志,并将第一个日志更改为&#34; AWESOME&#34;。发布移动服务,取得成功,并获得一个笑脸移动服务运行。

但是,日志是相同的,错误是相同的。虽然我将日志代码Services.Log.Info("GetCurGame Function");更改为Services.Log.Info("AWESOME");

我在这里缺少什么?

1 个答案:

答案 0 :(得分:2)

您可以做的最好的事情之一是检查Kudu的网站。这位于https://<your-mobile-site>.scm.azure-mobile.net - 它包含大量诊断信息,您可以使用这些信息查看您的移动网站是否正在部署。首先登录azure portal,然后转到Kudu站点。

另外,我建议安装某种JSON漂亮的打印机。我将JSONFormatter与谷歌浏览器结合使用 - 它可以通过Chrome商店获得。

相关问题