Custom Types in WCF Rest

Posted by user316341 on Stack Overflow See other posts from Stack Overflow or by user316341
Published on 2010-04-29T14:54:15Z Indexed on 2010/04/29 14:57 UTC
Read the original article Hit count: 372

Filed under:
|
|

I am using the Rest Singleton WCF Service temple from the Rest Starter Kit. The temples uses sample item as its sample Item. i am attempting to replace that sample ITem with a custom type from web reference in my ASP.Net project .dll. The types and name spaces are found and i can replace the sample item in the code. when i run the application i get this error:

"Exception has been thrown by the target of an invocation." when this line is executed

"return new SingletonServiceHost(serviceType, baseAddresses);"

<%@ ServiceHost Language="C#" Debug="true" Service="SAUDServices.Service" Factory="SAUDServices.AppServiceHostFactory"%>

using System; using System.ServiceModel; using System.ServiceModel.Activation; using Microsoft.ServiceModel.Web.SpecializedServices; using Stretchatyourdesk;

namespace SAUDServices { class AppServiceHostFactory : ServiceHostFactory { protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses) { return new SingletonServiceHost(serviceType, baseAddresses); } } }

© Stack Overflow or respective owner

Related posts about wcf

Related posts about c#