views:

199

answers:

1

Hi

I am following this tutorial

http://www.codeproject.com/KB/cpp/authforwebservices.aspx

They have this in the tutorial

 [SoapHeader("Authentication", Required = true)]
Warning   1 'System.Web.Services.Protocols.SoapHeaderAttribute.Required'

is obsolete: 'This property will be removed from a future version. The presence of a particular header in a SOAP message is no longer enforced'

So I am not sure what the "Required" actually referred to but it seems to not like it anymore. So do I just remove it. I am not sure since I don't know much about SOAP and I don't want to simple remove it and find that without it something else could go wrong.

+2  A: 

The docs state:

This member is obsolete and has no functionality.

Furthermore:

In version 1.0 of the .NET Framework SDK, the Required property indicates whether a SOAP header must be understood and processed by the recipient XML Web service or XML Web service client. If a recipient did not process the SOAP header an exception was thrown.

In other words, unless you're using .NET 1.0, it's already not doing anything - so you can safely remove it.

Jon Skeet
+1 Beat me to it just as I was typing - was going to say the same thing
AdaTheDev
Cool But why did they take it out? Like don't you want it too be processed? Like I am using it for authentication so would I not want it to be processed to check if its being sent and stuff?
chobo2
@chobo2: I'm afraid I don't know enough about that to comment. The docs do explain how to check things if you really need to.
Jon Skeet