简体   繁体   English

在Azure Server Hot Towel Angular上获取元数据查询失败错误微风/微风/元数据

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

I am following the HotTowel Angular Tutorials by John Papa. 我正在关注John Papa撰写的HotTowel Angular教程。 It works perfect on localhost but it is giving me errors when i deployed the website on Windows Azure. 它在localhost上可以完美运行,但是当我在Windows Azure上部署网站时却给我错误。 My website URL is : http://crmbyzaid.azurewebsites.net/index.html#/ 我的网站网址是: 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" “ [datacontext] [HT错误]错误检索数据元数据查询失败:微风/微风/元数据。无法解析或导入元数据:意外的令牌z;未定义错误:元数据查询失败:微风/微风/元数据。解析或导入元数据:意外的令牌z;未定义”

I do not know what happened during deployment. 我不知道部署期间发生了什么。 I have unchecked the box of "Use this connection string at runtime" during Deployment 我在部署过程中未选中“在运行时使用此连接字符串”框

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. 就我而言,问题是BreezeController上有多个方法接受了GET请求。 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. 这应该不是问题,因为应该基于路由设置通过方法名称调用控制器方法,但是无论出于何种原因,Azure都不配合。

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. 我最终能够确定问题的唯一方法是将调试器附加到在Azure上运行的站点,并启用符号服务器.....否则,无论如何,VS都不会中断。

Hope this helps! 希望这可以帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM