Question

I used WCF Data Service for CRUD operations. I have one remote service and many clients (computers). Some client reseived error on all edit operation (context have entity and we edit it now). Returned exception contains next message:"Your Browser sent a request with an unknown method (MERGE)". All clients uses Windows 7 with Framework 4.5. What can be the reason for this?

Service has a initialize method:

        // 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.UseVerboseErrors = true;
        config.SetEntitySetAccessRule("doc", EntitySetRights.All);
        config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V3;
    }

UPD1: It was found that the error disappears when client application running under an Administrator account (i.e. Administrator can edit entity without error). Perhaps the problem in the ClickOnce deployment.

UPD2: The reason in using the proxy server. Researching continues...

Was it helpful?

Solution

Solved a problem with a WCF Data Service and HTTP-requests (like HTTP MERGE) locking by proxy-server (http://msdn.microsoft.com/en-us/library/dd541471.aspx). The decision came down to one C# line for client service proxy-class using tunneling:

 docService.UsePostTunneling = true;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top