WCF and CORS: “No ‘Access-Control-Allow-Origin’ header is present on the requested resource”

If you are building an Angular app (or other form of HTML5 web application) you are probably running controllers on JSON data to bind to repeaters and present to your users. In many examples, this is usually set up with static data, or a local file, but inevitably you will want to architect something a bit more scalable. One way is to introduce a WCF service to act as your gateway to a data store, but if you are running this service outside of the domain of your web application, you will see the following error in your Javascript console:

No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://www.yourdomain.com’ is therefore not allowed access.

Continue reading “WCF and CORS: “No ‘Access-Control-Allow-Origin’ header is present on the requested resource””

Baby Steps to SOA – Step Six: Data Services

In the continuing Baby Steps to SOA series, we follow Doug and the IT team behind BuyMyWidget.com as they take steps to renovate their digital asset architecture. Previously, we introduced the problem and the team, started planning and analysis, decided on some metrics, and refactored the website applications. Most recently, the team has tackled identity management, introducing a CMS, and now continues with the migration of the data layer into web services.

Continue reading “Baby Steps to SOA – Step Six: Data Services”