wcf

Passing XML document to a web service using WCF.

Hi there, I need to pass an XML document to the web service. Is it possible to simply specify a contract with a method, say void Method(XmlDocument myDocument); and implement it in a standard way? I need to keep in my the Silverlight functionality, thus I want to avoid writing the XML to a stream... Is it a good approach? Thank you...

Making DDE connection from WCF service hosted in console app

I have WCF service hosted in console app. Service tries to connect to opened windows application via DDE protocol. No luck. Where is the problem? Console app is running in my account, as the dde windows app. ...

How to change the default schemalocation in wsdl file of WCf Service?

Hi all, Following is the wsdl file of my service: <wsdl:types> <xsd:schema targetNamespace="http://tempuri.org/Imports"&gt; <xsd:import schemaLocation="http://localhost:3789/VideoUpload.svc?xsd=xsd0" namespace="http://tempuri.org/" /> <xsd:import schemaLocation="http://localhost:3789/VideoUpload.svc?xsd=xsd1" nam...

WCF: Destinguish between REST and SOAP requests using the OperationContext

In WCF security, given the current OperationContext, what is the best way to determine whether the request is a SOAP request or a REST request? ...

OData / WCF Data Services metadata versioning

Is there any metadata versioning support in OData protocol and its WCF Data Services implementation? Let us suppose that we have OData service that exposes the single Goods colletion, and the Goods entity type has three properties: Key (string), Name (string) and AvailableSince(string). The service is already running, and there are some...

C#: using type of "self" as generic parameter?

This may seem a bit odd, but I really need to create a workaround for the very complicated duplex - communication - handling in C#, especially to force other developers to observe the DRY - principle. So what I'm doing is to have a type based multiton that looks like this: internal sealed class SessionManager<T> where T : DuplexService...

WCF reliable sessions via proxy server - not sending authentication credentials on Windows XP

Hello, I have a full trust XBAP which connects using reliable sessions to a remote service using the endpoint configuration attached below. The catch is that when running the application behind a client's organizational proxy server, the WCF requests are blocked on Windows XP but pass through fine on Windows 7. My suspicion (pending fur...

Sending Linq expressions over WCF

I want to be able to send linq queries over wcf just like in ria services and wcf data services, but I do not want to use either of them. Are there any codeplex project or similar which could help me with this problem. Or are there easey to extract that code from ria with reflector? ...

Need recommendations and help with ASP.NET + WCF + Security

i'd like to recieve comments on the way i'm trying to build an asp.net web application which uses a WCF service that is hosted in another asp.net application. Both applications will live on the same machine, but the app with the WCF service will not be accessible from the outside. there will be two web servers sharing the load behind a l...

What's does IMetadataExchange endpoint actually do?

Hi All, I'm working on a web service that uses ASP.NET security model (i.e. with AspNetCompatibilityRequirements set to allowed). Like many others, I got an error saying the Anonymous access is required because the mexHttpBinding requires it and the only way to get around it is to remove the mex endpoint from each service as described h...

Sharing Console Application object to Self-Host WCF Service

I need to share my application statistics via a wcf service. I'm able to self-host my wcf service but ServiceHost object constructor is default leaving me to unable to initialize other member variables of my service. Sample: public interface IService { //some operations here } public class Service : IService { object myObject; ...

Exposing LinqToSQL business layer via WCF data service

Hi, I'm looking for a way to expose a subset of my existing business layer (which is based on LinqToSql) via WCF Data Services so that The Data Service can still be consumed (read AND write) by older odata clients as my business layer evolves over time. It seems that the only way to guarantee this is by making sure the data service do...

Empty object while using PHP SOAP to consume WCF SOAP service

Hi there - I've got a big problem that I'm fiddling around for several days now :( Problem is: I need to consume a SOAP service that is provided by some MS WCF server (3rd party server, no access, no debug, no logs, transport secured via https). WSSE Authentication works like a charme - but every time I send an XML to the server, all d...

WCF Custom Certificate Validator: How to call built-in chain trust validation on top of your custom validation?

Hi, I have a custom validator that does validation based on the thumbprint of the client cert. How can I still call the in-built chain trust validator or perform chain trust validation? Thanks. ...

Attributes and elements missing from serialized object

Hi, I have some generated proxy classes, that contain properties with the XMLAttribute attribute, e.g. [System.Xml.Serialization.XmlAttributeAttribute(Form=System.Xml.Schema.XmlSchemaForm.Qualified, Namespace="http://www.egem.nl/StUF/StUF0301")] public Verwerkingssoort verwerkingssoort { get { return this.verwerkingssoo...

Invoking WCF service from a hyperlink in an email.

You know the scenario....You are adding functionality to your system to send out an email to validate a users email. Typically the email will contain a hyperlink which will request a page in your application - passing appropriate information - to determine that a user has validated their email.... I want to forgo adding a dedicated pag...

how to create and manage wcf service clients?

At first I treated them as any dependency passing them in the ctor to the class consuming the service: var serviceConsumer = new ServiceConsumer(new MailingServiceClient()) The problem was that once an exception was thrown from the service it entered a faulted state and would not reply to any requests, so re-initialization was due. F...

Silverlight is not fetching data from my WCF RIA service

I just started learning Silverlight by walking through the labs posted on Channel9. When I tried to explore a little bit I found that my queries were not working as I thought they would. To recreate what I have done you would need to create a new Silverlight Business application, create a data entity that is pointed to the Adventurewor...

How to create a PHP SOAP Client for calling a WCF Web service under SSL?

Hello everyone. We have a WCF service under an SSL Web Server installed in IIS. The web service was created with .NET 3.5 and WCF 3.0. We can access it with a .NET 3.5 client without problems. Let's call the URL where the service is published something like: https://my-server.com/testservice.svc?wsdl We need to make a proof of concep...

Custom lifetime management in DI containers (wcf proxy: Unity vs Castle Windsor)

Hello, I've found nice post: Singleton WCF Proxy. It is about the implementation of WCF proxy life scope using Castle Windsor DI container. Implementation of the abstract class AbstractLifestyleManager from Castle.MicroKernel.Lifestyle namespace overrides 3 methods: Resolve, Dispose and Release. In the Release method we have access ...