FaultContractAttribute , May 22 Build With Go-Live

Hi,

We are using the May 22 build of Wcf. This is a version with a Go-Live license.

I've noticed that the FaultContract attribute can only be aplied to methods in this build.

http://windowssdk.msdn.microsoft.com/en-us/library/system.servicemodel.faultcontractattribute.aspx

The documentation here (http://windowssdk.msdn.microsoft.com/en-us/library/ms733721.aspx) has a section "Faults for the Entire Contract"

For convenience, it is possible to apply the FaultContractAttribute attribute to an entire service contract as opposed to an individual operation. In that case, every operation in the service contract is able to return that type of fault. For example, in the following contract, any operation can return a MathFault:

I would like to know if FaultContract will be useable on classes and interfaces. If so, when will the first version with a Go-Live be available.

[1339 byte] By [AndrewSeven] at [2007-12-24]
# 1

Just to clarify: the documentation is inconsitent.

The content @ the second link contradicts the content @ the first link.

I will have several exception that could be thrown by each/any of the methods in my service, so I need the behavior described in "Faults for the Entire Contract".

AndrewSeven at 2007-10-7 > top of Msdn Tech,Visual Studio Orcas,Windows Communication Foundation (Indigo)...
# 2

Is this fixed in RC1?

If not, when will it be fixed?

AndrewSeven at 2007-10-7 > top of Msdn Tech,Visual Studio Orcas,Windows Communication Foundation (Indigo)...
# 3

Could someone with the RC installed check this?

AndrewSeven at 2007-10-7 > top of Msdn Tech,Visual Studio Orcas,Windows Communication Foundation (Indigo)...
# 4

It's NOT fixed in RC1.

And it is driving me crazy!!

Thornton at 2007-10-7 > top of Msdn Tech,Visual Studio Orcas,Windows Communication Foundation (Indigo)...
# 5
FaultContractAttribute can no longer be used at the service level. It only works at the operation level. I'll check to make sure the current documentation for these items has been updated.
RalphSquillace at 2007-10-7 > top of Msdn Tech,Visual Studio Orcas,Windows Communication Foundation (Indigo)...
# 6

:(

I don't seem to be alone in wanting the behavior; rather than just changing the documentation, how about adding something (an attribute) so that the scenario described in the documentation is in fact possible.

AndrewSeven at 2007-10-7 > top of Msdn Tech,Visual Studio Orcas,Windows Communication Foundation (Indigo)...
# 7

I have not tried it yet, but you should be able to write a contract behavior attribute that adds the fault contract to all operations on the contract.

Thanks,

Juval Lowy
JuvalLowy at 2007-10-7 > top of Msdn Tech,Visual Studio Orcas,Windows Communication Foundation (Indigo)...
# 8
I'm pretty sure I saw a sample that does what Juval said, but I would like the scenario to be supported directly.
AndrewSeven at 2007-10-7 > top of Msdn Tech,Visual Studio Orcas,Windows Communication Foundation (Indigo)...
# 9

I am also getting a compiler error on RC1 stating that the FaultContractAttribute is valid only on methods, and I've also seen the documentation state that it's possible to use the attribute at the service contract level.

vito1281 at 2007-10-7 > top of Msdn Tech,Visual Studio Orcas,Windows Communication Foundation (Indigo)...

Visual Studio Orcas

Site Classified