With regards to the Dependency injection, there is a $xhr service (it's a service used to GET data), but when I attempted to use it with IIS 7, no go. Checking IIS under the hood, I found no MIME mapping to .json files, so after some digging on the web, here is how to set it up:
Configure IIS to recognize JSON:
IIS7 configuration to support JSON:
Using IIS manager: clock on IIS server (the main node on the left - where you see the machine name)
- Add ‘json’ MIME Type
- Double click on ‘MIME Types’ icon
- Click ‘Add…’ link (under Actions section on the right side)
- In ‘Add MIME Type’ window type:
File name extension: .json
MIME type: application/json2. Add Script Map Handler for ‘json’ MIME Type
- Click OK, You should see the .json MIME Type added to the list of the MIME Types list.
- Double click on ‘Handler Mappings’ icon
- Click on ‘Add Script Map…’ link (under Actions section on the right side)
- In ‘Add Script Map’ window type:
Request path: *.json
Executable: C:\Windows\System32\inetsrv\asp.dll
Name: JSON
- Click OK (Message box pops up with a message: Do you want to allow this ISAPI extension?...etc ) Click Yes, You should see the .json extension added to the list of the Handler Mappings list