views:

39

answers:

1

If I upgrade a WCF Web Service from .NET 3.5 to 4.0, making no other changes, is there any risk of a change to the contract exposed to the outside world? ie. Will my consumers need to reconsume the WSDL?

If so, is there anything I can do to stop that happening?

EDIT: An example of the kind of thing I'm talking about.

We have been using something like this for a while http://www.codeproject.com/KB/aspnet/WSSecurityProvider.aspx

I may be reading this wrong but when I upgraded the server and reconsumed from the client, the Reference.cs changed so that

public MyNamespace.MembershipUser RemoteMembershipProvider_CreateUser(out System.Web.Security.MembershipCreateStatus status, string providerName, string applicationName, string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey) {
    return base.Channel.RemoteMembershipProvider_CreateUser(out status, providerName, applicationName, username, password, email, passwordQuestion, passwordAnswer, isApproved, providerUserKey);
}

changed to

public MyNamespace.MembershipUser RemoteMembershipProvider_CreateUser(out MyNamespace.MembershipCreateStatus status, string providerName, string applicationName, string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey) {
    return base.Channel.RemoteMembershipProvider_CreateUser(out status, providerName, applicationName, username, password, email, passwordQuestion, passwordAnswer, isApproved, providerUserKey);
}

Note the change in namespace for MembershipCreateStatus.

(and no, I don't really have a namespace called MyNamespace)

Am I wrong in thinking that if I hadn't reconsumed, it would have stopped working?

And if not, what is the specific thing that has change and how many other cases will it effect? Just framework enums? Or more than that?

+2  A: 

No, there shouldn't be any issues - after all, all that travels between the client and the server is the serialized message.

The client really doesn't care what OS or .NET version the server is on - as long as the message can be understood and interpreted.

As long as you don't change anything, you should be just fine!

marc_s
The serialised message relies on class names and namespaces, some of which are auto-generated by the framework. That is my concern. Not to suggest you're wrong, I'm just saying there's more to it than I have control over.
pdr
Xml namespaces will not change so serialization will not be broken.
Ladislav Mrnka
@Ladislav - Looks like you're right. It's the client side of the framework that changed. Thanks to both of you
pdr