PageMethodsModule POST / asmx question

Skip to first unread message


Jan 8, 2008, 9:53:37 PM1/8/08
to PageMethods
While working on a site that uses PageMethods (nice job btw). I found
that using posts with web services specifically the microsoft
implementation did not work too well. I generally got a 405 error
when trying to invoke the server method from the client side code. I
tracked it down to the pageMethodModule code. The code that I
downloaded looks like this. Under what conditions though would the
handler be null that pageMethods should handle?

private static bool IsSupportedHandler(IHttpHandler handler)
if (handler == null)
return true;
if (handler is Page)
return true;

I found that in my cases with .asmx services, the handle was null, but
when the rewrite was later done, the problems showed up. If instead I
change that to false so that the only true condition is (handler is
Page) then everything works.

So what is the case under which handler is null that PageMethods
should handle. And secondly, how would you (in this module) determine
that it was an asmx vs. an aspx other then by file extension. is
there any sort of property that tells you that the scripthandler is
involved, etc?


Fabrice Marguerie

Jan 27, 2008, 3:23:08 PM1/27/08
to PageMethods

I don't know when handler is null. But I'm sure that a special case
for web services is required.
I don't know if testing on the extension is the best solution, but it
is one you can use.

You're mentioning rewriting. What kind of rewriting are you using?
Would you have sample code we could use to try to reproduce the issue?

Reply all
Reply to author
0 new messages