wcf

Using JSON.NET with RESTful WCF service in .NET 4

Has anyone got a RESTful WCF service (in .NET4) successfully using JSON.NET to do serialization/deserialization? What's the best approach? ...

Thread.CurrentPrincipal is reset in ProvideFault method of IErrorHandler

I'm running into a weird problem with Thread.CurrentPrincipal. I implemented my own custom IAuthorizationPolicy in WCF. In Evaluate() method, I set evaluateContext.Properties["Principal"] = <my custom principal>. I can see that later on my Thread.CurrentPrincipal correctly contains my custom principal. The problem that I'm running into i...

Web reference proxy is field specified

I have a WCF service. And in my mobile application I generated a Web References. I notice that for some fields it also generates a myFieldSpecified bool. For example, i have a class Quantity that contains an int quantity. on the mobile side it also generates a bool quantitySpecified. What is the purpose of this specified field? ...

When to use the Endpoint Identity node when configuring a WCF client app?

My question stems from an earlier client proxy that svcutil generated for me based on a server configuration. I use a server side certificate credential using a Sql Memebership provider to authenticate the user. For the bindings I simply used <behavior name="MembershipBehaviour"> <serviceMetadata httpsGetEnabled="true" /> ...

How to get the RealProxy when I know only the transparent proxy.

I have a transparent proxy, for instance one generated by WCF: ChannelFactory<ICalculator> channelFactory = new ChannelFactory<ICalculator>( new NetNamedPipeBinding(), "net.pipe://localhost/WcfTransparentProxy/Calculator" ); ICalculator calculator = channelFactory.CreateChannel();...

Including exception details when using a Castle WCF Facility hosted service

I'm having some trouble unit testing a bit of code while utilising the Wcf Facility for Castle Windsor. It seems to refuse to include Exception Details when an Exception is thrown, I only get to see empty FaultExceptions. This is my test setup: First, here's a stub of the service that I will be connecting to: [ServiceBehavior(IncludeEx...

.NET - [DataContract] create a problem in WCF

Hello, I'm using WCF. At client side, I have this class without [DataContract]: public class UserEntity { public string login; public string password; } when I put [DataContract] and refresh the reference of this class at WCF side, then I can't initiate the web service. It says an error "cannot create metadata"...

CommunicationObjectFaultedException occurring only in test environment

I have a WCF service than in my development and production environments works without any trouble but in my test environment it will occasionally throw a CommunicationObjectFaultedException. This has been very difficult to track down but it seems to happen only after going a long time with out calling it. The client is a web applicta...

WCF general fault is encrypted where protection level is sign only

If a general fault is raised on my service endpoint the fault response is undesirably and unexpectedly encrypted. I have created an endpoint with a custom binding for interoperability reasons with a java spring framework set up with transport security with signature only over soap 1.1. <service behaviorConfiguration="MyProject.We...

WCF or Custom Socket Architecture

I'm writing a client/server architecture where there are going to be possibly hundreds of clients over multiple virtual machines, mostly on the intranet but some in other locations. Each client will be gathering data constantly and sending a message to a server every second or so. Each message will probably be about 128 characters or so...

Choosing a WCF Security Model for background client processes running at multiple domains that call a WCF WS?

Hi, I am creating a WCF web service using wsHttpBinding and a corresponding application that calls this web service. The idea behind the application that calls the WS is that it will be installed and run from multiple client sites as a background process. The background processes will periodically send information from it's respective...

Security in windows mobile app and wcf service

I'm kinda new in the mobile world and wcf world. I have develop a mobile app that communicates with a WCF service. What security topics should I look into? I do not know much about security either ... usually you try to secure the channel? the messages being sent? ...

Authenticating call to WCF / Web Service from ASP.Net MVC

Hi everyone, Basic question here (I think), I was hoping someone could point me in the right direction. I don't know much about WCF but I'd like to create a web service to be called from an ASP.Net MVC application. The goal is to make sure only authorized ASP.Net users (we're using forms authentication) can call the web service, not j...

Do I need to do anything special to make WCF calls work over HTTPS, ..if HTTP works fine?

I have two versions of the same proof-of-concept site: The unsecure version: http://www.tlsadmin.com/tlsadmin/PortalHome.aspx and the secure version: https://www.tlsadmin.com/tlsadmin/PortalHome.aspx The problem I have is that my WCF-Based web services don't seem to work under HTTPS. Is there something I'm missing, or not underst...

Is it possible to host an ASP.NET MVC2 website from a windows service?

I have a .NET 4 application that runs as a windows service. It runs periodic tasks and provides WCF restful webservices. It already hosts a silverlight web page (via WCF) that allows a user to configure the service. Now I have a requirement to provide information on HTML/java script pages (e.g. for browsers and platforms that don't su...

WCF REST service hosted in IIS does not support PUT and DELETE

I created a WCF REST (aka WebHttp) service in .NET 4, using Microsoft's WCF REST Service Template 40. I am hosting the service in IIS 6. The Service Template uses the RouteTable in the Global.asax as a way to create "clean" URL's that don't include ".svc" in them. For example: http:// localhost / flights / 878 GET and POST work fine a...

weird error about WCF -- System.ServiceModel.CommunicationException was unhandled

I created a simple WCF demo: Server Side: namespace ServerSide { class Program { static void Main(string[] args) { System.ServiceModel.ServiceHost host = new System.ServiceModel.ServiceHost(typeof(HelloIndigo.HelloIndigoService), new Uri("http://locahost:8000/HelloIndigo")); ...

WCF Service didn't reply, timeout encounters on a system behind firewall with NAT

I am encountering a strange problem, here is my scenario One WCF Service (named WCF1) is deployed on Web Server with basicHttpBinding (streaming enabled) I've a Windows Service Application which consumes WCF1, and hosts a WCF Service (named WCF2) with namedPipeBinding (duplex). A Windows Application which consumes WCF2, and handles e...

Should ASP.NET v2 IIS server extension be missing after .NET 4 is installed?

I'm having a ton of issues when my ASP.NET sites are using version 2. For example, all my SVC and ASPX files return "file not found". Also when I use IISMgr and navigate to: ServerName ..... Web Service Extensions I notice that ASP.NET v2 is not present. I tried aspnet_regiis but no luck. Does anyone have Windows 2003 with .NET 4 insta...

Can you use WCF services with Windows Phone 7?

I've only been able to find a couple of people online mentioning this, and it seems to be as simple for them as adding the service reference. However, when I attempt to add a service reference for my WCF service (which works correctly in a regular console app, so I have ruled the WCF out as the problem) I receive a host of errors. War...