我使用Azure的默认服务器(.net)和默认(uwp)应用程序来测试移动应用程序系统。Azure移动应用程序:请求无法完成。 (Bad Request)
发布服务器并通过应用程序连接到服务器后,我收到消息“请求无法完成(错误请求)”。我没有修改任何东西。这是从Azure门户下载的默认项目。
的回应是:
{的StatusCode:400,ReasonPhrase: '错误的请求',版本:1.1,内容:System.Net.Http.StreamContent,头: { 服务器:Microsoft-IIS/10.0 日期:孙年,2016年5月15日18点22分48秒GMT X供电,通过:ASP.NET X-谟服务器版本:净1.1.157.1 的Content-Length:228 内容类型:应用程序/ JSON;字符集= UTF-8 }}
客户做项目:
public class TodoItem
{
public string Id { get; set; }
[JsonProperty(PropertyName = "text")]
public string Text { get; set; }
[JsonProperty(PropertyName = "complete")]
public bool Complete { get; set; }
}
客户端逻辑:
private async void ButtonSave_Click(object sender, RoutedEventArgs e)
{
var todoItem = new TodoItem { Text = TextInput.Text };
TextInput.Text = "";
await InsertTodoItem(todoItem);
}
private async Task InsertTodoItem(TodoItem todoItem)
{
// This code inserts a new TodoItem into the database. When the operation completes
// and Mobile Apps has assigned an Id, the item is added to the CollectionView
await todoTable.InsertAsync(todoItem);
items.Add(todoItem);
//await App.MobileService.SyncContext.PushAsync(); // offline sync
}
我能做些什么来运行连接/系统?
感谢
有同样的问题。真的很困惑。以前工作得很好。突然我得到这个错误。我浏览了所有文档,其中一些表明我有权限问题(后端应用程序无法在数据库中生成表)。 –