locked
Error encountered in WCF Data Service: does not implement a ServiceContract type RRS feed

  • Question

  • User1965173075 posted

    I am learning about WCF web services enabling access to a SQL database following the process set out in the msdn community (http://msdn.microsoft.com/en-us/library/dd728275.aspx?cs-save-lang=1&cs-lang=vb#code-snippet-2 )

    I have created a data model (Seiji.edmx) and a WCF Data Service item (VB) with the following code:

    -----------------------

    Imports System.Data.Services
    Imports System.Data.Services.Common
    Imports System.Linq
    Imports System.ServiceModel.Web
    
    Public Class Seiji
        Public Class Seiji
            Inherits DataService(Of [Seiji])
    
            ' This method is called only once to initialize service-wide policies.
            Public Shared Sub InitializeService(ByVal config As DataServiceConfiguration)
                ' TODO: set rules to indicate which entity sets and service operations are visible, updatable, etc.
                config.SetEntitySetAccessRule("DimVoter", EntitySetRights.AllRead)
                config.SetEntitySetAccessRule("DimPerson", EntitySetRights.AllRead)
            End Sub
    
        End Class
    End Class


    --------------------

    When I publish this web service to the localhost I am receiving an error:

    Service 'Seiji' does not implement a ServiceContract type.

    Was hopeful that someone could point me in the correct direction for debugging this?  Cannot find anything online so far regarding this error.

    Thanks in advance.

    Tuesday, February 19, 2013 9:41 AM

Answers