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

Posted by idahosaedokpayi on Stack Overflow See other posts from Stack Overflow or by idahosaedokpayi
Published on 2009-05-07T09:15:46Z Indexed on 2010/03/18 18:01 UTC
Read the original article Hit count: 206

Filed under:

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">
 <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?

© Stack Overflow or respective owner

Related posts about ado.net-data-services