我是如何搞砸我的Azure移动应用程序服务器的? ZUMO BOOK示例 [英] How did I messed up my azure mobile app server?????? ZUMO BOOK Sample

查看:168
本文介绍了我是如何搞砸我的Azure移动应用程序服务器的? ZUMO BOOK示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在关注git hub上的Adrian Hall ZUMO BOOK,并试图重新创建他在他的书中显示的所有样本,实际上我是在第4章的服务器端代码中,我正在尝试上传本书的文件部分。

但是突然间,当我使用邮递员检查服务器时,它停止了对我的读取请求进行身份验证或写入的操作,它仅显示错误代码500 Internal Server Error。



所以每当我尝试使用SyncofflineCache时,我的程序都会抛出一个异常,但我似乎无法弄清楚它是什么。



 在TaskListViewModel $ b $中使用日志来查找错误b InitializeAsync:初始化存储
'TodoList.UWP.exe'(Win32):Loaded'C:\Windows\System32\propsys.dll'。跳过的加载符号。模块是本地的,并且本机调试当前被禁用。
InitializeAsync:定义数据存储
InitializeAsync:初始化SyncContext
CREATE TABLE IF NOT EXISTS [TodoItem]([id] TEXT PRIMARY KEY,[text] TEXT,[complete] BOOLEAN,[tagid] TEXT ,[UpdatedAt] DATETIME,[CreatedAt] DATETIME,[Version] BLOB)
CREATE TABLE IF NOT EXISTS [Tag]([id] TEXT PRIMARY KEY,[TagName] TEXT,[UpdatedAt] DATETIME,[CreatedAt] DATETIME ,[Version] BLOB)
CREATE TABLE IF NOT EXISTS [__operations]([id] TEXT PRIMARY KEY,[kind] INTEGER,[state] INTEGER,[tableName] TEXT,[tableKind] INTEGER,[itemId] TEXT ,[item] TEXT,[createdAt] DATETIME,[sequence] INTEGER,[version] INTEGER)

CREATE TABLE IF NOT EXISTS [__errors]([id] TEXT PRIMARY KEY,[httpStatus] INTEGER, [operationVersion] INTEGER,[operationKind] INTEGER,[tableName] TEXT,[tableKind] INTEGER,[item] TEXT,[rawResult] TEXT)
CREATE TABLE IF NOT EXISTS [__config]([id] TEXT PRIMARY KEY, [value] TEXT)
BEGIN TRANSACTION
INSERT或IGNORE INTO [__config]([id])V ALUES(@ p0)
@ p0:systemProperties | TodoItem
UPDATE [__config] SET [value] = @ p0 WHERE [id] = @ p1
@ p0:0
@ p1:systemProperties | TodoItem
COMMIT TRANSACTION
BEGIN TRANSACTION
INSERT或IGNORE INTO [__config]([id])VALUES(@ p0)
@ p0:systemProperties | Tag
UPDATE [__config] SET [value] = @ p0 WHERE [id] = @ p1
@ p0:0
@ p1:systemProperties | Tag
COMMIT TRANSACTION
SELECT * FROM [__operations] ORDER BY [sequence] DESC LIMIT 1
SELECT COUNT(1)AS [count] FROM [__operations]
{
count:0
}
InitializeAsync:同步脱机缓存
InitializeAsync:短路
连接到https://chapter1-backendtest.azurewebsites.net/现在 - 在线
SELECT * FROM [__operations] WHERE(( [tableKind] = @ p1)AND([sequence]> @ p2))ORDER BY [sequence] LIMIT 1
@ p1:0
@ p2:0
SELECT * FROM [__errors]
DELETE FROM [__errors] WHERE [id] IN(SELECT [id] FROM [__errors])
InitializeAsync:短路
SELECT * FROM [__operations] WHERE([tableName] = @ p1)LIMIT 0
@ p1:TodoItem
SELECT COUNT(1)AS [count] FROM [__operations] WHERE([tableName] = @ p1)
@ p1:TodoItem
{
count:0
}
SELECT * FROM [__config] WHERE id = @id
@id:deltaToken | TodoItem | incsync_TodoItem
请求:GET,https://chapter1-backendtest.azurewebsites.net/tables/ TodoItem?$ filter =(updatedAt ge datetimeoffset'1970-01-01T00:00.0000000%2B00:00')& $ orderby = updatedAt& $ skip = 0& $ top = 50& __ includeDeleted = true
响应:InternalServerError
{message:发生错误。}

老实说我不明白错误在哪里,或者它是如何停止工作的我已经检查了我的天蓝色移动应用程序配置,看起来一切都如此确定。



它在我的后端服务器上必须是错误的。
如果有人能帮我学习如何解决这个错误?或者如何进行调试才能了解更多信息。



我会感谢您的帮助,谢谢!!!

当我打电话给不需要身份验证邮递员工作的CustomController时,但是在任何不需要身份验证或需要它的自定义控制器的表控制器中。它发送给我相同的内部错误。



这是Adrian hall ZUMO BOOK: https://adrianhall.github.io/develop-mobile-apps-with-csharp-and-azure/chapter4/recipes/


它在我的后端服务器上必须是错误的。如果有人能帮助我学习如何解决这个错误?或者如何进行调试,以便了解更多信息。


AFAIK,您可以编辑 App_Start\\ \\ Startup.MobileApp.cs 文件并配置 IncludeErrorDetailPolicy ,如下所示捕获错误详细信息:

  HttpConfiguration config = new HttpConfiguration(); 
config.IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.Always;

另外,您可以记录或本地调试Azure移动应用后端。以下是一些教程,您可以参考它们:



调试和排查.NET Server SDK



本地开发和调试Mobile App .NET服务器后端


I'm following Adrian Hall ZUMO BOOK at git hub and trying to recreate all samples shown by him in his book actually i'm in chapter 4 at server side code, I was trying to do uploading file section of the book.

but suddenly when i used postman to check on my server it stopped being able to authenticate my read requests or write, it just shows me an error code 500 Internal Server Error.

so whenever I tried to SyncofflineCache my program throw an exception, but I cant seem to figure out what is it.

I used logs in order to find out the error and this is what I could get:

In TaskListViewModel
InitializeAsync: Initializing store
'TodoList.UWP.exe' (Win32): Loaded 'C:\Windows\System32\propsys.dll'. Skipped loading symbols. Module is native, and native debugging is currently disabled.
InitializeAsync: Defining Datastore
InitializeAsync: Initializing SyncContext
CREATE TABLE IF NOT EXISTS [TodoItem] ([id] TEXT PRIMARY KEY, [text] TEXT, [complete] BOOLEAN, [tagid] TEXT, [UpdatedAt] DATETIME, [CreatedAt] DATETIME, [Version] BLOB)
CREATE TABLE IF NOT EXISTS [Tag] ([id] TEXT PRIMARY KEY, [TagName] TEXT, [UpdatedAt] DATETIME, [CreatedAt] DATETIME, [Version] BLOB)
CREATE TABLE IF NOT EXISTS [__operations] ([id] TEXT PRIMARY KEY, [kind] INTEGER, [state] INTEGER, [tableName] TEXT, [tableKind] INTEGER, [itemId] TEXT, [item] TEXT, [createdAt] DATETIME, [sequence] INTEGER, [version] INTEGER)

CREATE TABLE IF NOT EXISTS [__errors] ([id] TEXT PRIMARY KEY, [httpStatus] INTEGER, [operationVersion] INTEGER, [operationKind] INTEGER, [tableName] TEXT, [tableKind] INTEGER, [item] TEXT, [rawResult] TEXT)
CREATE TABLE IF NOT EXISTS [__config] ([id] TEXT PRIMARY KEY, [value] TEXT)
BEGIN TRANSACTION
INSERT OR IGNORE INTO [__config] ([id]) VALUES (@p0)
@p0 : systemProperties|TodoItem
UPDATE [__config] SET [value] = @p0 WHERE [id] = @p1
@p0 : 0
@p1 : systemProperties|TodoItem
COMMIT TRANSACTION
BEGIN TRANSACTION
INSERT OR IGNORE INTO [__config] ([id]) VALUES (@p0)
@p0 : systemProperties|Tag
UPDATE [__config] SET [value] = @p0 WHERE [id] = @p1
@p0 : 0
@p1 : systemProperties|Tag
COMMIT TRANSACTION
SELECT * FROM [__operations] ORDER BY [sequence] DESC LIMIT 1
SELECT COUNT(1) AS [count] FROM [__operations]
{
  "count": 0
}
InitializeAsync: Syncing Offline Cache
InitializeAsync: Short Circuit
Connected to https://chapter1-backendtest.azurewebsites.net/ right now - online
SELECT * FROM [__operations] WHERE (([tableKind] = @p1) AND ([sequence] > @p2)) ORDER BY [sequence] LIMIT 1
@p1 : 0
@p2 : 0
SELECT * FROM [__errors]
DELETE FROM [__errors] WHERE [id] IN (SELECT [id] FROM [__errors])
InitializeAsync: Short Circuit
SELECT * FROM [__operations] WHERE ([tableName] = @p1) LIMIT 0
@p1 : TodoItem
SELECT COUNT(1) AS [count] FROM [__operations] WHERE ([tableName] = @p1)
@p1 : TodoItem
{
  "count": 0
}
SELECT * FROM [__config] WHERE id = @id
@id : deltaToken|TodoItem|incsync_TodoItem
Request: GET, https://chapter1-backendtest.azurewebsites.net/tables/TodoItem?$filter=(updatedAt ge datetimeoffset'1970-01-01T00:00:00.0000000%2B00:00')&$orderby=updatedAt&$skip=0&$top=50&__includeDeleted=true
Response: InternalServerError
{"message":"An error has occurred."}

Honestly I dont understand where the error is or how did it stopped working I had check my azure mobile apps configuration and everything seems to be ok.

It must be a error on my backend server. If someone could help me out to learn how to solve this error? or how to debug it in order to find out more about it.

i would appreciate your help, thanks!!!

When ever I made calls to CustomController who doesnt require authentication postman works find but in any table controller who doesnt require auth or custom controller that requires it. it sends me the same internal error.

This is Adrian hall ZUMO BOOK: https://adrianhall.github.io/develop-mobile-apps-with-csharp-and-azure/chapter4/recipes/

解决方案

It must be a error on my backend server. If someone could help me out to learn how to solve this error? or how to debug it in order to find out more about it.

AFAIK, you could edit App_Start\Startup.MobileApp.cs file and configure the IncludeErrorDetailPolicy as follows for capturing the error details:

HttpConfiguration config = new HttpConfiguration();
config.IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.Always;

Also, you could logging or local debugging your azure mobile apps backend. Here are some tutorials, you could refer to them:

Debug and troubleshoot the .NET Server SDK

Local development and debugging the Mobile App .NET server backend

这篇关于我是如何搞砸我的Azure移动应用程序服务器的? ZUMO BOOK示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆