datajs

Consuming Web API 2 OData endpoint requiring Windows Authentication with BreezeJS

我怕爱的太早我们不能终老 提交于 2019-12-23 04:45:22
问题 Has anyone have experience getting Breeze (or DataJS for that matter) to communicate with a Web API 2 OData endpoint which requires Windows Authentication and is hosted on a different server? I have successfully configured Web API to enable CORS and I am able to initiate a cross-domain request to the OData endpoint using jQuery: load: function () { $.ajax({ type: "GET", dataType: 'json', url: "http://services.company.com/odata/GeographicalRegions", xhrFields: { withCredentials: true },

How to pass authentication header to OData Service

筅森魡賤 提交于 2019-12-22 11:35:42
问题 I am following authentication method described at http://blogs.msdn.com/b/astoriateam/archive/2010/07/21/odata-and-authentication-part-6-custom-basic-authentication.aspx I am able to consume service using ASP.NET (not a problem at all). Now I would like to create a plain HTML page and access the service using "OData Javascript Library" (datajs). If I disable authentication and request for data, it works fine. I could not find any sample code on how to send authentication header information

How to pass authentication header to OData Service

流过昼夜 提交于 2019-12-22 11:35:04
问题 I am following authentication method described at http://blogs.msdn.com/b/astoriateam/archive/2010/07/21/odata-and-authentication-part-6-custom-basic-authentication.aspx I am able to consume service using ASP.NET (not a problem at all). Now I would like to create a plain HTML page and access the service using "OData Javascript Library" (datajs). If I disable authentication and request for data, it works fine. I could not find any sample code on how to send authentication header information

Using JayData to filter Header Detail Table - Inner Join SQL, oData

北慕城南 提交于 2019-12-13 19:20:22
问题 Hello Am kinda new and using JayData and oData so please forgive my ignorance. This is my object structure : $data.Entity.extend('PlannerModel.vMasterPlanner', { 'Sequence_Number': { key:true,type:'Edm.Int32',nullable:false,required:true }, 'Scenario_Name': { type:'Edm.String',nullable:true,maxLength:250 }, 'Activity_ID': { type:'Edm.String',nullable:false,required:true,maxLength:250 }, 'Activity_Description': { type:'Edm.String',nullable:true,maxLength:500 }, 'Object_ID': { type:'Edm.String'

Breeze | datajs - no handler for data

自古美人都是妖i 提交于 2019-12-13 05:47:35
问题 I am new in breeze world, but I want use it in my application. I tried test it with simple ASP.Net Api OData service based on Northwind.sdf database. In DataService project I have a simple controller: [BreezeController] public class CategoriesController : ODataController { readonly EFContextProvider<NORTHWNDContext> contextProvider = new EFContextProvider<NORTHWNDContext>(); [HttpGet] [EnableBreezeQuery] public IQueryable<Category> GetCategories() { return contextProvider.Context.Categories;

JayData oData request with custom headers

眉间皱痕 提交于 2019-12-11 08:47:33
问题 I need to send custom headers to my wcf oData Service but with the following function the headers dont get modified. entities.onReady(function () { entities.prepareRequest = function(r) { r[0].headers['APIKey'] = 'ABC'; }; entities.DataServiceClient.toArray(function (cli) { cli.forEach(function (c) { console.log(c.Name) }); }); }); headers are not affected. any clue? thanks! 回答1: It seems that the marked answer is incorrect. I was suffering from a similar issue, but got it working without

DataJS library not loading in RequireJS

[亡魂溺海] 提交于 2019-12-10 10:04:36
问题 I am new to RequireJS, so this might be a stupid question! I am using require-jquery. I want to load the DataJS library as a module. It is a standalone library and does not depend on jQuery. This is what my HTML file start.htm looks like: <html> <head> </head> <body> <script type="text/javascript" src="Scripts/Loader.js"></script> </body> </html> This is what the Loader.js file looks like: (function (window, undefined) { var script = document.createElement('script'); script.async = true;

DataJS library not loading in RequireJS

此生再无相见时 提交于 2019-12-06 04:37:15
I am new to RequireJS, so this might be a stupid question! I am using require-jquery. I want to load the DataJS library as a module. It is a standalone library and does not depend on jQuery. This is what my HTML file start.htm looks like: <html> <head> </head> <body> <script type="text/javascript" src="Scripts/Loader.js"></script> </body> </html> This is what the Loader.js file looks like: (function (window, undefined) { var script = document.createElement('script'); script.async = true; script.src = "scripts/require-jquery.js"; var entry = document.getElementsByTagName('script')[0]; entry