wcf

WCF DataContract Exclude DataMembers From Being Serialized In Derived Classes

I have a base class with DataMember properties in it. I also have a derived class with DataMember properties in it. In my WCF project I am returning the derived class. Is there a way for me to prevent a member in my base class from serializing? Here is some sample code: public class BaseClass { public string ShortDescription {get;se...

How to bind a WCF Http client to a specific outbound IPAddress before making the request

I want my request to go out through a specific IP Addresses. Is there a way to do that in WCF. The explanation of why I need this is a little long winded so i'd rather not get into that. Here is sample code string ipAddress = "192.168.0.32"; IService service; ChannelFactory<IOmlService> factory = new ChannelFactory<IService>(new Basic...

exception while using SerializeReply of IDispatchMessageFormatter

I am trying to develop a WCF REST app as explained in http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/04640a45-1a37-4722-8ed7-9f75c155dc14 (which serves both XML and JSON at the same time). the error is in the return statement of the following code: Public Function SerializeReply(ByVal messageVersion As System.ServiceModel.Cha...

Occasional error on production server: Method <name> is not supported on this proxy

One of 4 production servers once in a while generates tons of error claiming: Method RunRules is not supported on this proxy, this can happen if the method is not marked with OperationContractAttribute or if the interface type is not marked with ServiceContractAttribute. The method "RunRules" is one of the methods in wcf [ServiceContr...

RSS 2.0 using WCF: Adding custom namespace to the rss tag

We have a custom namespace we have for custom elements: <rss xmlns:blah="http://example.com/"&gt; I'm trying to add this namespace to the rss tag using WCF. Adding an AttributeExtension to the feed puts it in the <channel> element, not the <rss> element. Beyond string manipulation, how would I go about syndicating RSS 2.0 using WCF w...

Not tracing WCF Service (diagnostics tracing)

I have a client (a Unit Test) that call to WCF Service (hosting in debug mode in Console application). I have an error in service but I dont know which. I need trace it, but not generate anything file svclog in client. any suggestions , any sample code works ? EDIT: I use logging EntLibrary 4.1. I think there are errors in configurati...

How do I specify claim type requirements on the service side so they will be obeyed by the client request?

I have: A passive STS "login application" that is also an identity provider. An active STS WCF service that can accept and handle ActAs tokens A web site relying party A WCF service relying party that is called by the web site. All of this is put together using Windows Identity Foundation and custom STS code. Active Directory (ADFS) ...

WCF Ajax Call not working with Jquery $.ajax

I have the following jQuery (service name altered): var url = "http://localhost/services/MyService.svc/addentrant"; var stuff = $("#signup-form").serializeArray(); $.ajax({ type: "POST", url: url, contentType: "application/json; charset=utf-8", data: stuff, timeout: 10000, success: function (obj) { alert('yay!')...

How can I configure WCF to accept SSL and non-SSL

I need some help configuring WCF to support multiple environments. One environment allows anonymous authentication over standard HTTP and the other uses Windows Authentication over SSL. I can configure WCF to support either of the environments, but not both within the same web.config file. Here's what allows anonymous over http: <be...

Get client IP address for WCF, post operation

I am trying to determine the client's IP address following this link: http://www.danrigsby.com/blog/index.php/2008/05/21/get-the-clients-address-in-wcf/. I have operationContracts of WebInvoke/Post and WebGet. The code works when the client request is a WebGet. But when the client request is a WebInvoke, I will get the WCF host IP. Any s...

Mono WCF InstanceContextMode not working

I have a service that looks like this: [ServiceContract(SessionMode = SessionMode.Required)] public interface ILabListener { [OperationContract] byte[] GetChallenge(); ... ... [ServiceBehavior(IncludeExceptionDetailInFaults = true, InstanceContextMode = InstanceContextMode.PerSession)] class LabListener : ILabListener { ...

How to effectively manage/host many WCF services for an SOA

My current architecture is a nice fit for SOA. The services are written using WCF, and everything is .NET (no interoperability required). To start off with I was hosting the WCF services inside a Windows Service with ServiceHost. But now the number of services is growing and I am reconsidering the choice to have them as separate Windo...

Sync Framework 2.0 issue over https

is there any configuration that I need to do to have a successful sync where my site has SSL certificate? you see i have a windows application that using WCF to sync data from my local database to the server database. Previously the site has no SSL certificate so it was name like this "http://www.example.com". The sync was working that ...

Is there an alternative to HTTPS for securing a web site?

At work we are always having numerous problems with our x.509 certificates that we use for https and I was wondering is there a useful alternative for securing the communication between a server and the browser. Edit Could also be that we are using IIS x.509 and WCF ...

Is it bad to have 'You have created a service' page for published wcf service on the internet?

Hello, I have created wcf service and planning to make it accessible from the internet. The page 'You have created a service' seems to be some stub which should be replaced before putting service on production. Is it a bad practice to have this welcome page on production? What do you do with that welcome page when you publish wcf servic...

WCF permanent Connection

Hello =) I have a multi-gui one-service architecture (i implement both, service and client) (using .net 3.5, c#, windows application/service). whats the best practice to update the guis? i know duplex communication, but if the client doesn't send any requests for some time, the channel is closed! increasing the timeout is not the best ...

Problem consuming RESTful WCF web service with php curl

I am having problems consuming a WCF web service (PaySimple's v3.00 API) using php curl. I am trying to post an xml payload to the service and I keep getting a 400 - Bad Request error. When I using Firefox's Poster add-on, I can post the very same payload and I get the expected response - 200 OK with an XML response containing the requir...

Large File download in WCF and Windows Service

I have been creating a new service to download large file to client. I want to host the service in a Windows Service. In service I am writing : public class FileTransferService : IFileTransferService { private string ConfigPath { get { return ConfigurationSettings.AppSettings...

WCF Workflow Service Application - Required Extensions

Hello, I built a WCF Workflow Service App and I built in a custom activity with a required extension in the workflow. In a web app, I'm trying to create a service reference to the WCF workflow service but it says that an extension that is required has not been provided; so how do I consume a service with a required extension? At what ...

Unable to catch WCF exception in SecurityToken.GetToken( ... )

I have a set of WCF services that I am integrating with, I can not change them in any way because they are provided by a third party. I use a username/password scheme to authenticate with the services. If the services are not available I get an exception (EndPointNotFoundException) from the SecurityTokenProvider class that I can not ca...