wcf

WCF EntLib Validation - change default SOAP Fault Reason text

I'm using the Enterprise Library Validation Application Block for my WCF service. All is fine, and .Net consumers can catch the FaultException<ValidationFault> exception to get a collection of human-readable business errors. However, it doesn't look quite as great for non-.Net consumers, especially those that are going to be looking at t...

Returning XML From a WCF Service

I am creating a WCF Web Service in which one method (exposed in Service) return data in XML format as given below: public string QueryDirectoryEntry() { XmlDocument doc = new XmlDocument(); doc.Load(@"c:\" + FILE_NAME); return doc.InnerXml; } If the client call this method ther service return data ...

Why does WCF sometimes add "Field" to end of generated proxy types?

Basically, I have a server-side type "Foo" with members X and Y. Whenever I use Visual Studio's "Add Server Reference" then I see the WSDL and the generated proxy both append the word "Field" to all the members and change the casing of the first letter. IE, "X" and "Y" are renamed "xField" and "yField". Any idea why this is happening? I ...

WCF v.s. legacy ASP.Net Web Services

Duplicate: although this is a good discussion, this is a duplicate of Web Services — WCF vs. Standard. Please consider adding any new information to the earlier question and closing this one. Could anyone recommend me some documents to describe why WCF is better than legacy ASP.Net web services? I am especially interested in performan...

WCF Client Using Certificate and Username/Password credentials?

I am consuming a web service internal to my company from ASP.NET. I've used svcutil.exe to connect to the service and generate the bindings and classes from the wsdl. I am able to connect to the dev version, which does not require authentication. Now we are adding in security. My new URI uses https but also requires user credentials. I...

WCF Proxy Types are in a Different Namespace than WCF Service Types

I am invoking a service through WCF and has encountered a problem with non-matching namespaces. The object that is beeing sent though the service is in the namespace MyProject.Commons.BuisnessObjects, and I have verified this through WcfTestClient. When I invoke a method clientside on the service (after initiated this with new MyServ...

Problem with WCF Service - The protocol 'http' is not supported. How to resolve?

I'm after setting up a WCF service on my dev box but I'm getting an error when accessing it. I've set the service up as per this guide. It's is written in VS2008 / C# / .NET 3.5 and my dev box is Vista SP2 with IIS 7. At the moment the service is nothing more than the default structure since I am literally after testing a connection to i...

Null argument values passed from HTML form to WCF REST function

I have created a RESTful WCF service with a method that will be used to save data using a POST. I want to test this method from an HTML form. The following HTML form and interface definition (and related .cs code) result in the SaveTest function getting called when I hit the form Submit button, however the one argument id is always set t...

Secure WCF Service hosted in IIS 7 using the windows authentication restricted by defined group or users

How to configure a wcf service hosted in IIS 7 to enable access for only defined users / groups to. Existing configuration: <authentication mode="Windows"/> <services> <service name="MyService.Test" behaviorConfiguration="MyService.TestBehavior"> <endpoint address="" binding="wsHttpBinding" contract="MyService.ITest"> <ide...

1 end point multiple servicecontracts - wcf?

I created a service which allows clients to search for user information. This is exposed as an interface ISearchUsers. I used this article as a base but to no avail: Not sure if this is the way to go link text Now I want to create and expose an interface called ICreateUser and i assumed that i had to create a new endpoint , basicHttp b...

How Do I configure Multiple Service Endpoints in WCF?

Hi. I'd like some basic guidance on setting up my WCF configuration. This is my first serious effort with WCF (and first post on stackoverflow). I have a WCF class library (APILibrary) that I am referncing in my web project. In the wcf library, I currently have two services - IAuthService and ITradeService. Along these lines, I h...

Windows Authentication, Custom permissions, WCF, Active Directory

Hello, I have a client/server project, communicating with WCF (Named Pipes for now, but that can change - but I cannot use IIS). This project is integrated with Active Directory. This program is designed to give users permissions that normally don't have permissions, by acting as a sort of proxy. The user uses the client to "request"...

Keeping track number of connected users to WCF service?

I have a net tcp PerSession WCF service, my current logic for keeping track the number of connected users (active clients) is using the service constructor and heartbeat mechanism. in the constructor I just increment a static member, and during sending heartbeat to client if one of these exceptions raises ( TimeoutException, FaultExcept...

Silverlight with WCF Doesn't Work in FireFox

I have a Silverlight app that is using WCF to connect to some services. The services are running as a windows service and are on a different port, so I have to use a client access policy file. In the WCF services there is a method for getting the client access policy. [WebGet( ResponseFormat = WebMessageFormat.Xml )] public Stream GetC...

WCF Service Error

Hi, I have a WCF service deployed on a windows 2003 server. We are using a WPF application to consume this service. The trouble is if we deploy a new version of WCF service or leave the IIS and WPF application idle for sometime and then try to execute a functionality, we are get the following exception: The content type text/html of th...

Best way to use and secure WCF on the Compact Framework?

I am working on an app that has several clients - Desktop, Mobile Device, Web Portal. We're moving to an SOA kind of architecture and will be using WCF. The WCF story is great when it comes to using netTcp+transport/message security+Windows authentication (or even UsernameToken and a custom UsernameValidator provider) on the Desktop an...

choosing the right WCF web service option

I'm just starting out with WCF web services, and I'm having a really hard time finding a very simple tutorial, so I thought I'd ask some questions here. Here's my setup: I have a WPF desktop application that needs to send data over the internet to a web service on our server. The way I see it, I have at least these four options: I ca...

WCF + WF + IIS 7 Virtual Path Error

I'm trying something new to me using WCF and WWF to build up a set of services for use by a few client applications. I'm create 2 libraries (Workflows and Services) and 1 Web Application called API. The web application is hosted within IIS 7. In the API web application, I've added a file called InventoryService.svc file that has Service...

Is there an easier way to wrap every WCF method in a service with a 'using' block?

I'll take TransactionScope as my example for now. Imagine every method in your WCF carries out database activity, and you want every call to be in a transaction. You could include a using block in every one of your methods, and that would work fine. I'm wondering if there is an easier way to do this at a service, rather than method-leve...

How to upload files larger than 16k to a WCF-service?

To make a long story short: Making a web application Each user profile contains exactly one profile image, which is stored in the database The bottom layer uses ADO.NET entity framework for data access and relationships between classes Inserting images into the database on the bottom data access layer of the application works fine On t...