Hi,
I have Silverlight 4.0 client calling WCF data service, in the service I have write allow to all (I know that is not very wise, but I want to test it first):
public static void InitializeService(DataServiceConfiguration config)
{
// TODO: set rules to indicate which entity sets and service operations are visible, updatable, etc.
// Examples:
config.SetEntitySetAccessRule("*", EntitySetRights.All);
config.SetServiceOperationAccessRule("*", ServiceOperationRights.All);
config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2;
config.UseVerboseErrors = true;
}
when I call the service from the client using BeginSaveChanges like this:
MyServiceEntity.BeginSaveChanges(SaveChangesOptions.Batch, OnChangesSaved, MyServiceEntity);
I receive forbidden error:
--batchresponse_a7bc1f95-8f8d-4e3b-9e24-108743499c3a
Content-Type: multipart/mixed; boundary=changesetresponse_04a92dd2-1fe4-4da5-8d2e-e020fe354f8f
--changesetresponse_04a92dd2-1fe4-4da5-8d2e-e020fe354f8f
Content-Type: application/http
Content-Transfer-Encoding: binary
HTTP/1.1 403 Forbidden
Content-ID: 1
DataServiceVersion: 1.0;
Content-Type: application/xml
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<code></code>
<message xml:lang="en-US">Forbidden</message>
</error>
--changesetresponse_04a92dd2-1fe4-4da5-8d2e-e020fe354f8f--
--batchresponse_a7bc1f95-8f8d-4e3b-9e24-108743499c3a--
And Batch operation response code is 202, whatever this is supposed to mean.
Any help is appreciated.
cheers
Valko