I want to manually make the wcf service channel to enter to faulted state to test a singleton object. I tried many solutions like changing 1. consuming incorrect service host name, 2. Incorrect host ip, 3. reducing exeution time to trigger timeout exception, 4.divide by zero exception, 5.throwing fault exception, 6.null reference exception
But nothing make the service channel faulted. Kindly advice. Thanks in advance
what type of binding you are using? I think you need to use binding which support session. have you tried using WsHttpBinding? Please have a look at the code sample below and try to pass 0 value for b to generate DivideByZeroException. This will cause the channel to be in fault state
My service contract: `
` My Service Contract implementation:
`
`
EndPoint:
`