locked
azure-mobile-apps-quickstarts get error from .net service to UWP RRS feed

  • Question

  • (I'm brand new to Azure). * Visual Studio 2019

    I run the UWP app ... add an entry here

        private async Task InsertTodoItem(TodoItem todoItem)
        {
            // This code inserts a new TodoItem into the database. After the operation completes
            // and the mobile app backend has assigned an id, the item is added to the CollectionView.
    

    the Request is shown as

    {Method: GET, RequestUri: 'https://myfirstazurewebapp20191213111544.azurewebsites.net/tables/TodoItem?$filter=(complete eq false)', Version: 2.0, Content: , Headers: { X-ZUMO-FEATURES: TT,TC X-ZUMO-INSTALLATION-ID: 998980a7-592a-4113-b1dc-6ebe3691b8bb Accept: application/json User-Agent: ZUMO/4.1 User-Agent: (lang=Managed; os=Windows Store; os_version=--; arch=X86; version=4.1.1.0) X-ZUMO-VERSION: ZUMO/4.1 (lang=Managed; os=Windows Store; os_version=--; arch=X86; version=4.1.1.0) ZUMO-API-VERSION: 2.0.0 Accept-Encoding: gzip }}

    However I get an error reply

    {StatusCode: 500, ReasonPhrase: 'Internal Server Error', Version: 1.1, Content: System.Net.Http.StreamContent, Headers: { Server: Microsoft-IIS/10.0 Set-Cookie: ARRAffinity=e26452b9ab4162bf874a7a557d2b3213793b954884fe2afaba6f881f8f5285d5;Path=/;HttpOnly;Domain=myfirstazurewebapp20191213111544.azurewebsites.net Date: Fri, 13 Dec 2019 19:52:03 GMT X-Powered-By: ASP.NET Content-Length: 36 Content-Type: application/json; charset=utf-8 }}

    I'm thinking it's something really simple that i don't have properly configured in the Azure App Service. I used all the example code "as is".

    **I checked Azure for this service and found these errors

    1>

    Unhandled ASP.NET exceptions detected The below table shows the un-handled exceptions that got logged to the EventLog.xml file for your app.

    Exceptions Count OperationCanceledException

    at System.Threading.CancellationToken.ThrowOperationCanceledException at System.Web.Http.Owin.HttpMessageHandlerAdapter.d__13.MoveNext at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification at System.Web.Http.Owin.HttpMessageHandlerAdapter.d__0.MoveNext at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContextStage.d__5.MoveNext at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContext.d__2.MoveNext at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.StageAsyncResult.End at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContext.EndFinalWork at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute at System.Web.HttpApplication.ExecuteStepImpl at System.Web.HttpApplication.ExecuteStep

    2>

    Failed Request URLs grouped by HTTP Status Code Choose a HTTP Status Code to view Top 15 Request Urls that failed with that status code : Failed Requests By URI for HTTP Status Code - 500 Method Url RequestCount HttpStatus HttpSubStatus GET /tables/TodoItem 10 500 0 POST /tables/TodoItem 7 500 0

    Sadly, I'm baffled

    ~tom


    Tom

    Friday, December 13, 2019 9:55 PM

All replies

  • Follow these steps to create a new Mobile App backend.

    Sign in to the Azure portal.

    Click Create a resource.

    In the search box, type Web App.

    In the results list, select Web App from the Marketplace.

    Select your Subscription and Resource Group (select an existing resource group or create a new one (using the same name as your app)).

    Choose a unique Name of your web app.

    Choose the default Publish option as Code.

    In the Runtime stack, you need to select a version under ASP.NET or Node. If you are building a .NET backend, select a version under ASP.NET. Otherwise if you are targeting a Node based application, select one of the version from Node.

    Select the right Operating System, either Linux or Windows.

    Select the Region where you would like this app to be deployed.

    Select the appropriate App Service Plan and hit Review and create.

    Under Resource Group, select an existing resource group or create a new one (using the same name as your app).

    Click Create. Wait a few minutes for the service to be deployed successfully before proceeding. Watch the Notifications (bell) icon in the portal header for status updates.

    Once the deployment is completed, click on the Deployment details section and then click on the Resource of Type Microsoft.Web/sites. It will navigate you to the App Service Web App that you just created.

    Click on the Configuration blade under Settings and in the Application settings, click on the New application setting button.

    In the Add/Edit application setting page, enter Name as MobileAppsManagement_EXTENSION_VERSION and Value as latest and hit OK.
    Saturday, December 14, 2019 6:00 AM
  • thank you for this reply... I still get an error when running the UWP app that's linked,....  this is what I see in the UWP exception (below).... To my read it looks like the connection is being refused by I don't know why?... since at the beginning of the StackTrace I see "[ Microsoft.WindowsAzure.MobileServices.MobileServiceHttpClient.<ThrowInvalidResponse>d ...]

    REQUEST> 

    {Method: GET, RequestUri: 'https://myfirstazurewebapp20191213111544.azurewebsites.net/tables/TodoItem?$filter=(complete eq false)', Version: 2.0, Content: <null>, Headers:
    {
      X-ZUMO-FEATURES: TT,TC
      X-ZUMO-INSTALLATION-ID: 998980a7-592a-4113-b1dc-6ebe3691b8bb
      Accept: application/json
      User-Agent: ZUMO/4.1
      User-Agent: (lang=Managed; os=Windows Store; os_version=--; arch=X86; version=4.1.2.0)
      X-ZUMO-VERSION: ZUMO/4.1 (lang=Managed; os=Windows Store; os_version=--; arch=X86; version=4.1.2.0)
      ZUMO-API-VERSION: 2.0.0
      Accept-Encoding: gzip
    }}

    RESPONSE> 

    {StatusCode: 500, ReasonPhrase: 'Internal Server Error', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
    {
      Request-Context: appId=cid-v1:5143ebd3-a989-4a2c-af82-5deb98e31996
      Server: Microsoft-IIS/10.0
      Set-Cookie: ARRAffinity=e26452b9ab4162bf874a7a557d2b3213793b954884fe2afaba6f881f8f5285d5;Path=/;HttpOnly;Domain=myfirstazurewebapp20191213111544.azurewebsites.net
      Date: Sat, 14 Dec 2019 19:43:50 GMT
      X-Powered-By: ASP.NET
      Access-Control-Expose-Headers: Request-Context
      Content-Length: 36
      Content-Type: application/json; charset=utf-8
    }}

    STACKTRACE>  "   at Microsoft.WindowsAzure.MobileServices.MobileServiceHttpClient.<ThrowInvalidResponse>d__24.MoveNext()\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.WindowsAzure.MobileServices.MobileServiceHttpClient.<SendRequestAsync>d__27.MoveNext()\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.WindowsAzure.MobileServices.MobileServiceHttpClient.<RequestAsync>d__18.MoveNext()\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.WindowsAzure.MobileServices.MobileServiceTable.<ReadAsync>d__20.MoveNext()\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.WindowsAzure.MobileServices.MobileServiceTable.<ReadAsync>d__18.MoveNext()\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.WindowsAzure.MobileServices.Query.MobileServiceTableQueryProvider.<Execute>d__8`1.MoveNext()\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.WindowsAzure.MobileServices.Query.MobileServiceTableQueryProvider.<Execute>d__7`1.MoveNext()\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.WindowsAzure.MobileServices.MobileServiceCollection`2.<ProcessQueryAsync>d__18.MoveNext()\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.WindowsAzure.MobileServices.MobileServiceCollection`2.<LoadMoreItemsAsync>d__32.MoveNext()\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.WindowsAzure.MobileServices.MobileServiceCollectionExtensions.<ToCollectionAsync>d__0`1.MoveNext()\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   at ZUMOAPPNAME.MainPage.<RefreshTodoItems>d__5.MoveNext() in C:\\Users\\giebi\\Source\\Repos\\Azure\\azure-mobile-apps-quickstarts\\client\\windows-uwp-cs\\ZUMOAPPNAME\\MainPage.xaml.cs:line 73"


    Tom

    Saturday, December 14, 2019 7:53 PM
  • Hello, 

    Thank you for reaching out to us. Apologies for the delay here.

    We are so sorry to hear that you are still having issues. Since I am unable to reproduce your issue, we need to investigate it further.

    In order to for us to further troubleshoot this issue, we will need you to send us an email at AzCommunity@Microsoft.com 

    Subject :ATTN:Monika 

    Please provide the below details : 

    - Subscription ID 

    - A link to this thread.

    I hope this information helps. 

    Looking forward for your email. 

    Thursday, December 19, 2019 3:22 PM
  • just sent email

    Tom

    Tuesday, January 7, 2020 6:39 PM