Click here to Skip to main content
15,891,704 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Many in the shop thought that making a simple change to a private method would not cause any problems to the client apps as long as there were no changes made to the contract. I just beefed up the private method below to return more useful information and then promoted it to the Web Server. Within seconds the errors started flying from all over the state. My first hunch is that the service reference from those client machines needed to be updated also to relfect the changes, if so why would that need to be; nothing changed in the message either, except a longer string being returned in the message. I have read all the MSDN on Versioning and what breaks the service, etc. Big cheeses need an answer so I can move on to other things.

So, why would the client apps crash with just this change in the service code?


From:
Private Function GetErrorMessage() return "blah blah" End Function


To:
Private Function GetErrorMessage(ByVal errorMessage As String,
ByVal macAddress As String,
ByVal sessionID As String,
ByVal Schema As String,
Optional ByVal IVDnumber As String = "000000000"
) As String

Dim message As New StringBuilder()
message.Append("0,")
message.AppendLine("WCF Service Information " & Environment.NewLine)
message.AppendLine("DB Schema: " & Schema.ToString & Environment.NewLine)
message.AppendLine("MAC: " & macAddress & Environment.NewLine)
message.AppendLine("SID: " & sessionID & Environment.NewLine)
message.AppendLine("IV-D: " & IVDnumber & Environment.NewLine)
message.Append(errorMessage)
Return message.ToString()

End Function
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900