wcf

RESTful WCF Data Service Authentication

Hi, I'd like to implement a REST api to an existing ASP.NET MVC website. I've managed to set up WCF Data services so that I can browse my data, but now the question is how to handle authentication. Right now the data service is secured via the site's built in forms authentication, and that's ok when accessing the service from AJAX form...

how to create nettcpbinding of this custombinding

I am new at WCF programming model and I want to use netTcpBinding. Before I ask my question below this is my custom binding : <customBinding> <binding name="basic"> <security authenticationMode="UserNameForCertificate"/> <binaryMessageEncoding/> <httpsTransport/> </binding> </customBinding> When I create a se...

Browser connects to WCF service but not my WCF client. What can be the reason?

On a production server (Windows Server 2003 SP2) I can connect to a remote WCF service with Internet Explorer 8: When I browse to the URL http://www.domain.com/Service.svc (where my service listens) I get the expected info page of the service displayed. Connection settings in Internet Explorer only specify "auto detect", proxy settings a...

How to implement Self-host WCF data serivces (http://localhost:1234/myDataService.svc/...)

I have a project that needs to implement WCF data services (OData) to retrieve data from a control system (.NET Framework Application). The WCF data service needs to be hosted by the .NET application (No ASP.NET and NO IIS). I have seen many WCF Data Service examples recently; they are all hosted by ASP.NET application. I also see the s...

WCF Endpoint routing

Hi, Guys, how to route inbound message between different endpoints. I need to expose the single endpoint that could accept different credentials. I guess, solve this by intercept the incoming message and based on message header then do forward message to appropriate endpoint. Thanks. ...

Provide ServiceKnownType during runtime?

I've got a working WCF interface using more than 100 ServiceKnownType in the contract like this: [ServiceKnownType(typeof(RowUser))] [ServiceKnownType(typeof(RowRegion))] [ServiceKnownType(typeof(RowDocument))] [... loads more ...] [ServiceContract(SessionMode = SessionMode.Required)] public interface IServiceBrowse : IDisposable { [O...

Using IOperationBehavior to supply a WCF parameter

This is my first step into the world of stackoverflow, so apologies if I cock anything up. I'm trying to create a WCF Operation which has a parameter that is not exposed to the outside world, but is instead automatically passed into the function. So the world sees this: int Add(int a, int b) But it is implemented as: int Add(object co...

WCF message encryption

Is it possible to host a WCF service in IIS, access it over HTTP and have the message body encrypted using a wsHttpBinding configuration? ...

Missing something with Entity Framework for .NET 3.5?

Is it not possible to have EF create the necessary entities when I have two related tables linked with a FK in .NET3.5SP1? I see where the checkbox to support this is disabled but it is available in .NET4. I've got a DB that has only tables with relationships in it. I need to build a Silverlight app (SL4) that allows management of the d...

Casting Down Data Contract Objects

Hi Guys, I've got an object on my client that derives from a class that is being sent over a WCF contract. I'm hitting problems de-serializing this as it appears to send the class over as it stands, and the deserialization on the server side determines what object to create and populate, and as the object only exists on the client it fa...

Question about using ServiceModelEx's "WCFLogbook" from "Programming WCF Services" book

I am attempting to compile/run a sample WCF application from Juval Lowy's website (author of Programming WCF Services & founder of IDesign). Of course the example application utilizes Juval's ServiceModelEx library and logs faults/errors to a "WCFLogbook" database. Unfortunately, when the sample app faults, I get the following new error...

How to remove default header from WCF REST Outgoing Response?

The following C# WCF based REST service gives me some undesired headers that I'm not sure if I can remove them trough the API. The interface: [ServiceContract] public interface IControlSystem { [OperationContract] [WebGet] System.IO.Stream About(); } The implementation: public class ControlSystem : IControlSystem { p...

Secure/Best Practices for Account Creation for app that uses REST services?

I apologize if this is a somewhat stupid question, but I am very new to the REST programming realm. I have an application that is both web, mobile and machine accessible, and I will be leveraging REST-like web services for the mobile and machine part. I was going to use the S3 authentication model for the REST requests, however that re...

Strange exception when connecting to a WCF service via a proxy server

The exception "This operation is not supported for a relative URI." occurs in the following situation: I have a WCF service: [ServiceContract(ProtectionLevel=ProtectionLevel.None)] public interface IMyService { [OperationContract] [FaultContract(typeof(MyFault))] List<MyDto> MyOperation(int param); // other operations ...

WCF Router with Conversion from BasicHttpBinding to WsFederationHttpBinding

I'm using the stock WCF MessageRouter example to route messages between a Silverlight client and any number of back end web services. This is working well. Now I need to solve the problem that some of my web services require SAML federation and use the WsFederationHttpBinding. Assuming I can solve the problem of obtaining the SAML tok...

WCF REST Service not working - not showing anything

I've been scratching my head for the past 20 hrs or so trying to figure out what is wrong with my rudimentary WCF app but with absolutely no luck :( I was following this tutorial: http://www.c-sharpcorner.com/UploadFile/dhananjaycoder/RESTEnabledService05122009034907AM/RESTEnabledService.aspx and for some reason the WCF is showing a bl...

WCF fault logging and SQL Exception 4060 error.

I have been attempting to compile/run a sample WCF application from Juval Lowy's website (author of Programming WCF Services & founder of IDesign) for several days. The example app utilizes Juval's ServiceModelEx library which logs faults/errors to a "WCFLogbook" SQL database. Unfortunately, when the sample app faults, I get the followin...

How can I make a single WCF method ConcurrencyMode.Multiple when service is ConcurencyMode.Single

I have a service which is defined as ConcurrencyMode.Single: [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Single, UseSynchronizationContext = false, InstanceContextMode = InstanceContextMode.PerSession, IncludeExceptionDetailInFaults = true)] public class MyService : IMyService This service provides a method to tell ...

WCF - call same service from client and server side

I have a simple WCF service that I call server side from code behind via a service reference. It's used for validation and works and was automatically setup by Visual Studio and is using SOAP I think because the binding is wsHttpBinding. I want to use the same WCF service, but call it client side from jQuery using ajax(). I'm trying t...

restart/iisreset disables NET.TCP protocol ?

I'm hosting a WCF service in IIS7 on Windows Server 08, sp2. The service is hosted as its own website and is exposed via a NET.TCP endpoint. The service works perfectly until a restart/iisreset command is issued. After restart or iisreset, when I make any service call, I receive the following error: 'System.ServiceModel.EndpointNotFound...