0

I'm in charge of a WCF service. Our client has requested an override feature: If a call is resubmitted, allow the operation to proceed despite warnings. I need a way to persist data from recent calls so I can detect a resubmission. I thought making the service durable, part of WF3, would resolve the problem; however, my service uses .NET 4.5 which marks WF3 as obsolete. I've been trying to find the WF4 equivalent, but nothing's clicked for me. All the examples presume a workflow which I lack.

What is the best solution for my needs?


Edit:

According to this question, a static variable should meet my needs, but I haven't been able to get one to persist between calls.

Community
  • 1
  • 1
ricksmt
  • 888
  • 2
  • 13
  • 34

1 Answers1

0

A static variable did meet my needs.

I used a property to interact with my static variable, and in the getter I would remove some of the old data. For some reason, having that call in the getter prevented the static variable from persisting. I relocated the clean up code (incidentally I didn't need the property anymore), and the static variable persisted.

ricksmt
  • 888
  • 2
  • 13
  • 34