May 12, 2014, 6:48 AM
OData + strange error
Hello
I'm trying to use odata as the proxy and getting "Request failture error"
I must be missing something pretty simple, possible with WFC data service ?
In attachment as well screenshot from the whole browser (note that store of combobox is empty)
here is code
Page:
I'm trying to use odata as the proxy and getting "Request failture error"
I must be missing something pretty simple, possible with WFC data service ?
In attachment as well screenshot from the whole browser (note that store of combobox is empty)
here is code
Page:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test1.aspx.cs" Inherits="Tests_Test1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<ext:ResourceManager runat="server" runat="server" Theme="Gray" Namespace="">
</ext:ResourceManager>
<ext:ComboBox runat="server">
<Store>
<ext:Store runat="server" AutoLoad="true">
<Proxy>
<ext:ODataProxy Url="../WcfDataService.svc/LeaderTypes" >
<Writer>
<ext:JsonWriter/>
</Writer>
<Reader>
<ext:ODataReader runat="server" />
</Reader>
</ext:ODataProxy>
</Proxy>
</ext:Store>
</Store>
</ext:ComboBox>
</div>
</form>
</body>
</html>
service public class WcfDataService : DataService<AmsDbContext>
{
// This method is called only once to initialize service-wide policies.
public static void InitializeService(DataServiceConfiguration config)
{
// TODO: set rules to indicate which entity sets and service operations are visible, updatable, etc.
// Examples:
// config.SetEntitySetAccessRule("MyEntityset", EntitySetRights.AllRead);
// config.SetServiceOperationAccessRule("MyServiceOperation", ServiceOperationRights.All);
config.SetEntitySetAccessRule("*", EntitySetRights.All);
config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2;
}
}
Firefox + firebug result