Search code examples
angularjsvisual-studio-2012azurebreezehottowel

Getting Metadata Query Failed error breeze/Breeze/Metadata on Azure Server Hot Towel Angular


I am following the HotTowel Angular Tutorials by John Papa. It works perfect on localhost but it is giving me errors when i deployed the website on Windows Azure. My website URL is : http://crmbyzaid.azurewebsites.net/index.html#/

And I am getting the errors like

"[datacontext] [HT Error] Error Retriving DataMetadata query failed for: breeze/Breeze/Metadata. Unable to either parse or import metadata: Unexpected token z; undefined Error: Metadata query failed for: breeze/Breeze/Metadata. Unable to either parse or import metadata: Unexpected token z; undefined"

I do not know what happened during deployment. I have unchecked the box of "Use this connection string at runtime" during Deployment


Solution

  • This question is a few weeks old, but I thought I would share my experience since I had exact same issue. In my case, the problem was that there were multiple methods on BreezeController that accepted a GET request. This should not have been an issue since the controller methods should be called by method name based on route setup, but for whatever reason Azure was not cooperating.

    I removed the other methods, which were just stubs anyway, and it began working just fine. The only way I was able to finally determine this was the issue was by attaching debugger to the site running on Azure, and also enabling symbol server(s).....otherwise VS would not break on the exception no matter what.

    Hope this helps!