Common issues and solutions

JavaScript errors:

If your application runs fine in the Simulator but not in the browser, you can check if there are any JavaScript errors.

To view the JavaScript errors, open the browser Developer Tools (Press F12 or Ctrl+Shift+I) and go to the Console tab.

Here is a list of common JavaScript errors that you may encounter:

  • No 'Access-Control-Allow-Origin' header is present on the requested resource
    Solution: either ensure that the client and the server are on the same domain, or add support for CORS on the server to enable cross-domain calls. To do so, follow this tutorial.
  • Could not find the name 'Xml' in the namespace 'Microsoft'.
    Solution: You must add the attribute "[DataContract]" to any class that you want to serialize, deserialize, or pass as argument or return value of a WCF call. Learn more.
  • XmlSerializer assembly does not contain a serializer for type '...'
    Solution: You must ensure that any type that you serialize/deserialize (or use in a WCF call) is marked as "public" (rather than "internal" or "private"), and that it has the "[DataContract]" attribute. If the error persists, please look at the output of the compilation (in the Output pane of Visual Studio) for possible hints (look especially at the "SerializationAssembliesGenerator" part). Learn more.

 

Related Topics

 

Contact Us

Please click here for contact information.