环境:VS 2017 MAC专业版
我创建了一个 Azure移动应用快速入门应用服务。我似乎在没有问题的情况下运行并启动应用程序,因为我收到此移动应用已启动并正在运行消息。
导航到控制器操作(GET请求)时,我收到资源未找到错误。
网址:http://127.0.0.1:8080/TodoItem/GetTodoItem
Application Exception
System.Web.HttpException
The resource cannot be found.
Description: HTTP 404.The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Details: Requested URL: /TodoItem/GetTodoItem
Exception stack trace:
at System.Web.StaticFileHandler.ProcessRequest (System.Web.HttpContext context) [0x00094] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/System.Web/System.Web/StaticFileHandler.cs:77
at System.Web.DefaultHttpHandler.BeginProcessRequest (System.Web.HttpContext context, System.AsyncCallback callback, System.Object state) [0x0007f] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/System.Web/System.Web/DefaultHttpHandler.cs:101
at System.Web.HttpApplication+<Pipeline>d__225.MoveNext () [0x008d4] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/System.Web/System.Web/HttpApplication.cs:1335
at System.Web.HttpApplication.Tick () [0x00000] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/System.Web/System.Web/HttpApplication.cs:927
Version Information: 5.4.0.212 (2017-06/fbc487ff424 Fri Oct 6 06:41:39 EDT 2017); ASP.NET Version: 4.0.30319.42000
我想要的只是在本地调试代码。为什么找不到资源?我做错了什么?
答案 0 :(得分:1)
要获取所有ToDoItems,GET请求URL将如下所示: http://127.0.0.1:8080/tables/TodoItem
要获取特定的ToDoItem记录,请将记录ID添加到URL: http://127.0.0.1:8080/tables/TodoItem/44941398-2C4F-4733-864F-2B629DB0B66A