views:

653

answers:

2

So, I'm using URL routing with WebForms. I run locally through the Visual Studio web server, and everything is hunky-dory. I deploy locally to IIS (XP, so it's IIS5), and therefore I need to make sure that I have my app wildcard mapped so the URL routing is handled properly.

However, doing this makes all my PageMethods fail with this message: The HTTP verb POST used to access path is not allowed

Something like /default.aspx/SendMessage does not work. I've seen solutions that exclude .svx and .asmx files, however, since this is a page method, this is a .aspx file. I know the solution is to move these files outside of .aspx, however, I have quite a few functions throughout the site in these various files. I guess I could create a single web service, and have all the functions there, however, I'm curious if there's a quick and easy way to fix this?

Thanks all, -Steve

+1  A: 

Looks like there isn't a way to do this with IIS5, wildcard mapping, and URL routing with PageMethods. I've since relocated the functions to appropriate web services, which is actually much cleaner than intermingling aspx pages with page methods...

LookitsPuck
A: 

Add the following code to the javascript somewhere after the PageMethod gets defined and before you call your PageMethod:

PageMethods.set_path('default.aspx');

That should fix it right up.

Lone Coder