ADO.NET Data Services The media type requires a ';' character before parameter definition

I am experimenting with ADO.NET and I see this error on my second try to view the service:

<?xml version="1.0" encoding="utf-8" standalone="yes" ?> 
 <error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
 <code /> 
<message xml:lang="en-US">Media type requires a ';' character before a parameter  definition.</message> 
</error>

      

The first attempt is normal. I'm working with exactly the same service on the internal development network and that's okay. I include the connection string:

<add name="J4Entities" connectionString="metadata=res://*;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=MNSTSQL01N;Initial Catalog=J4;Integrated Security=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient"/>

      

and my data service class:

 using System;
 using System.Data.Services;
 using System.Collections.Generic;
 using System.Linq;
 using System.ServiceModel.Web;

 public class Data : DataService< J4Model.J4Entities >
 {
    // This method is called only once to initialize service-wide policies.
    public static void InitializeService(IDataServiceConfiguration config)
    {
        // TODO: set rules to indicate which entity sets and service operations are    visible, updatable, etc.
        // Examples:
        config.SetEntitySetAccessRule("*", EntitySetRights.AllRead);
        // config.SetServiceOperationAccessRule("MyServiceOperation",    ServiceOperationRights.All);
     }
   }

      

Is there something obvious that I am not doing?

0


a source to share


2 answers


I have the same problem -

Here's what I've found so far:

MSDN Social Forum



I'm not sure what exactly is causing it, but everything worked fine for me and it stopped working giving me a similar error.

Rather disappointment ....

0


a source


Check the HTTP request header: Accept. ADO.NET Data Services has a problem parsing certain Accept Header types from different clients.

RFC for Accept header: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html



Just found an issue where the Solr / Java libraries call oData.Net service.

0


a source







All Articles