Charles Hankey
Charles Hankey

Reputation: 505

Breeze.js 1.53 possible breaking changes from Breeze.js 1.5.1

I am using a subdomain on my hosted website for this application. So imi.{url} goes directly to the folder with the app. Breeze 1.5.3

I have another site running on a different subdomain that uses 3 breeze controllers successfully. Breeze 1.5.1

Both apps Angular 1.3n

The imi (problem) app uses a single breeze controller with the default name BreezeController.

The app is a Hot Towel SPA and runs fine in VS2013 against the web hosted MSSQL database.

When I upload the website to the serve the first call to the breeze/Breeze/Metadata gets a 404

http://imi.mysite.com/imi/breeze/Breeze/Metadata

in the other app

http://qui.mysite.com/qui/breeze/Quoting/Metadata

works fine.

I have compared the webconfig files and adjusted the imi webconfig to match the working app

these are the files being using in the working app

 <package id="Angular.UI" version="0.4" targetFramework="net45" />
  <package id="Angular.UI.Bootstrap" version="0.12.0" targetFramework="net45" />
  <package id="angularjs" version="1.3.2" targetFramework="net45" />
  <package id="AngularJS.Animate" version="1.3.2" targetFramework="net45" />
  <package id="AngularJS.Core" version="1.3.2" targetFramework="net45" />
  <package id="AngularJS.Route" version="1.3.2" targetFramework="net45" />
  <package id="AngularJS.Sanitize" version="1.3.2" targetFramework="net45" />
  <package id="angularjs.TypeScript.DefinitelyTyped" version="2.2.2" targetFramework="net45" />
  <package id="angular-translate.TypeScript.DefinitelyTyped" version="0.9.0" targetFramework="net45" />
  <package id="bootstrap" version="3.3.0" targetFramework="net45" />
  <package id="Breeze.Angular" version="1.0.1" targetFramework="net45" />
  <package id="Breeze.Angular.Directives" version="1.3.9" targetFramework="net45" />
  <package id="Breeze.Client" version="1.5.1" targetFramework="net45" />
  <package id="Breeze.Server.ContextProvider" version="1.5.1" targetFramework="net45" />
  <package id="Breeze.Server.ContextProvider.EF6" version="1.5.1" targetFramework="net45" />
  <package id="Breeze.Server.WebApi2" version="1.5.1" targetFramework="net45" />
  <package id="Breeze.WebApi2.EF6" version="1.5.1" targetFramework="net45" />
  <package id="EntityFramework" version="6.1.1" targetFramework="net45" />
  <package id="FontAwesome" version="4.2.0" targetFramework="net45" />
  <package id="HotTowel.Angular" version="2.3.0" targetFramework="net45" />
  <package id="HotTowel.Angular.Breeze" version="2.3.0" targetFramework="net45" />

And these are the relevant files being used in the new app, running on the same web server

package id="Angular.UI.Bootstrap" version="0.12.0" targetFramework="net45" />
  <package id="Angular.UI.Utils" version="0.2.1" targetFramework="net45" />
  <package id="AngularJS.Animate" version="1.3.8" targetFramework="net45" />
  <package id="AngularJS.Core" version="1.3.8" targetFramework="net45" />
  <package id="AngularJS.Route" version="1.3.8" targetFramework="net45" />
  <package id="AngularJS.Sanitize" version="1.3.8" targetFramework="net45" />
  <package id="angular-moment" version="0.9.0" targetFramework="net45" />
  <package id="angular-smart-table" version="1.4.8" targetFramework="net45" />
  <package id="bootstrap" version="3.3.2" targetFramework="net45" />
  <package id="Breeze.Angular" version="1.1.0" targetFramework="net45" />
  <package id="Breeze.Angular.Directives" version="1.3.9" targetFramework="net45" />
  <package id="Breeze.Client" version="1.5.3" targetFramework="net45" />
  <package id="Breeze.Server.ContextProvider" version="1.5.3" targetFramework="net45" />
  <package id="Breeze.Server.ContextProvider.EF6" version="1.5.3" targetFramework="net45" />
  <package id="Breeze.Server.WebApi2" version="1.5.3" targetFramework="net45" />
  <package id="EntityFramework" version="6.1.2" targetFramework="net45" />
  <package id="FontAwesome" version="4.2.0" targetFramework="net45" />
  <package id="HotTowel.Angular" version="2.3.3" targetFramework="net45" 

In the 1.5.3 app the first call to Breeze/Metadata fails as described above, though it does not fail when running against the same connection string from Visual Studio.

I have also found that locally the breezeSaveErrorExtensions.js throws an unhandled error that it cannot find breeze when installed exactly as in the 1.5.1 app.

Am I missing a file, do I have some version mismatch or is there a breaking change I am not taking into account?

Upvotes: 0

Views: 160

Answers (1)

Charles Hankey
Charles Hankey

Reputation: 505

There is no evidence of a breaking change between Breeze 1.51 and 1.53.

The problem was failure to have the Breeze dlls fully-trusted. This was not a problem when run locally but of course became a problem when deployed.

In Chrome dev tools there was just a 404 failure to return Metadata. Could have cleared it up much more quickly if I had also tested in Firefox which correctly said the problem was that BreezeWebApi2 needed to be fully trusted.

Adding to in the web.config (as I had done long ago but forgotten about in the app mentioned above that worked fine) resolved the issue.

Moral: browser dev tools have their own strengths and weaknesses and testing with multiple browser tools can be quite helpful in resolving problems.

Upvotes: 1

Related Questions