1
votes

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

1
What happens when you make the request for metadata directly to the Azure site. Look at the request URL in your browser developer tools network tab and start poking at azure with that.Ward
In Console it is showing me the http error. I have given the URL of Website in my question "crmbyzaid.azurewebsites.net/index.html#" please check the error in chrome debugger and tell me what is the problem actually i am new in this technologyZaid Iqbal
@Ward It is working perfect in localhost...Zaid Iqbal
I'm asking a different question. I'm asking you to tell us exactly what the application is requesting when it tries to talk to your azure site, not localhost. When you get that failure, open the browser developer tools, go to the network tab, and tell us the exact URL for the azure metadata call. I think it should be something like http://crmbyzaid.azurewebsites.net/breeze/Breeze/Metadata. I'll bet it isn't. We need to start there anyway.Ward
@Ward this is the Request Information Remote Address:65.52.168.70:80 Request URL:crmbyzaid.azurewebsites.net/breeze/Breeze/Metadata Request Method:GET Status Code:200 OKZaid Iqbal

1 Answers

1
votes

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!