c# - Accessing Azure Mobile Service on Windows Phone from Different Projects -


hello having following exception:

additional information: request not completed. (bad request)

i did not understand why since function worked therefore found following on stackoverflow: mobileserviceinvalidoperationexception when trying retrieve data azure. issue unfortunately not solve issue.

the time correct , using https connection. , communication working perfectly. have divided windows phone silverlight application several projects, reason have stated in stackoverflow question: deleting project/pages/usercontrols memory.

the application flow is:

  • project 1:

    1. login (authenticate mobileservice)
    2. navigate mainmenu, upon success.
    3. service contacted await mobileservice.invokeapiasync<dto.userinfodto, dto.userinfodto>(userinfodto); success allways!
    4. mobileservice saved resources application.current.resources.add("navigationparam", app.mobileservice); , navigating new project done.
  • project 2:
    1. navigation parameter retrieved mobileservice = mobileserviceclient)application.current.resources["navigationparam"]; (information seems intact when looking debugger).
    2. service contacted await mobileservice.invokeapiasync<dto.userinfodto, dto.userinfodto>(userinfodto); success never!

i know packages in order in project 2 because can upload information blob storage , includes same in both projects. contact own backend service application crashes above exception.

so can me issue, need create new mobileserviceclient , reauthenticate? seems stupid?

i'm not sure going wrong, generally, recommend making new client instance here.

to avoid login issue @ caching mobile service's token. (see: http://azure.microsoft.com/en-us/documentation/articles/mobile-services-windows-dotnet-how-to-use-client-library/#caching)

then can spin new client, reuse existing auth tokens/etc, , continue on.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -