How to access a Service Reference from JavaScript?
===

(WCFDS = WCF Data Services 5,backed by Entity Framework, using oData v3, formatted as JSON, served up via IIS7 and protected by Windows authentication.)

The crux is accessing the WCFDS in an authenticated manner from an AJAX call.

To this end, I have a client as an ASP.Net Web Application with Windows authentication set in Web.config and a Service Reference pointing to the WCFDS.

I want to use client-side JavaScript to access the Service Reference. How can I do this?

I thought about creating an aspx page, hosting in the client and direct calls from JavaScript code to this page, which would then retrieve data through the Service Reference - but I'm at a loss over how to expose the full functionality of the Service Reference in this manner (there are dozens of entities).

Can anyone help with advice?