I got stuck on this error when making a JSON WCF service in ASP.NET using .NET 4 today, another interface worked just fine. Figured out by comparing them that the markup for the faulty .SVC was missing this declaration:
Factory="System.ServiceModel.Activation.WebServiceHostFactory"
In full it should have read
<%@ ServiceHost Language="C#" Debug="true" Service="WebPages.Interfaces.example" CodeBehind="example.svc.cs" Factory="System.ServiceModel.Activation.WebServiceHostFactory" %>
, but it actually read
<%@ ServiceHost Language="C#" Debug="true" Service="WebPages.Interfaces.example" CodeBehind="example.svc.cs" %>

0 kommentarer:
Legg inn en kommentar