Occasional error on production server: Method <name> is not supported on this proxy
Asked Answered
H

1

9

One of 4 production servers once in a while generates tons of error claiming:

Method RunRules is not supported on this proxy, this can happen if the method is not marked with OperationContractAttribute or if the interface type is not marked with ServiceContractAttribute.

The method "RunRules" is one of the methods in wcf [ServiceContract] interface, and it is marked as [OperationContract].

Before this error, in the same method, occasionally it would get a wrong service through castle container. After I put more logging information to nail down exact cause, it mutated into the current error.

It is a webservice the error comes out of, it tries to call into a windows service through wcf endpoint when this happens. And this only happens on one specific machine. The frequency is about once a week or 2 weeks. Once recycle of the webservice happens (3 hours), the error stops.

To me it is almost like corrupted vtable. Just wondering, how would you approach this problem? Hate to ask IT people start to re-image the machine without solid proof.

Thanks!

Harmattan answered 26/8, 2010 at 16:58 Comment(8)
have you found a solution to this problem? we've got a very similar issue.Wistrup
I have the same error using castle wcf facility. restarting the web site in IIS fixes it for me. But I also would like the answer.Monger
How are you registering your services on the client?Monger
I have also got this error having IIS on my local machine and doing a build from visual studio. This is when I need to restart the web site in IIS, seems it got mixed up. @Wistrup did you find a solution?Monger
@AranMulholland: not yet. we figured as much as you do, had to restart apppool to get it back to work. but it happened only once so we don't have any statistics. the only interesting thing is that we've got both iis and windows-service based WCFs and only IIS-based proxies failed.Wistrup
Just for clarification - "Before this error, in the same method, occasionally it would get a wrong service through castle container." are you using WCF Integration Facility with Castle (using WindsorServiceHostFactory)? Is this service pure (no DI containers etc.)?Beneficence
@PetarVucetin When we get this error we are using WindsorSevcieHostFactory on the service end and also using the wcf facility to resolve the services on the client side.Monger
That would be my prime suspect.Beneficence
Q
0

No simple answer for such abstract magic error, so try out logging entire call stack, especially internal Castle DLL calls, if standart exception does not contain such deep call stack information - use reflection.

// use this in loop incrementing levelIndex up to st.FrameCount
// to grab all possible callstack entries
StackTrace st = new StackTrace();
st.GetFrame(levelIndex).GetMethod().Name;

Then using utility like ILSpy disassemble Castle DLL and try out analyze which state causes concrete execution flow which ends up with exception you got.

If you able log callstack - please share so I would be able check it as well.

Qulllon answered 23/4, 2012 at 19:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.