views:

74

answers:

2

I am experimenting with ADO.NET and I am seeing this error on the second attempt to browse the service:

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

The first attempt is normal. I am working with an exactly identical service on an internal development network and it is fine. I am including my 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 I am not doing?

A: 

I'm having a similar issue -

Here's what I've found so far:

MSDN Social forum

I'm not sure what exactly causes it, but everything was once fine for me then it stopped working giving me a similar error.

Rather frustrating....

TeckniX
A: 

Check the HTTP Request Header: Accept. ADO.NET Data Services has an issue parsing certain Accept Header types from various clients.

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

Just discovered an issue when Solr/Java libraries call an oData .Net service.

Mark

related questions