Urlrewrite is a widely used technology recently. Many websites face it in order to hide or reflect more humane addresses. At the same time, another development model, Atlas, is also gaining traction in the Ajax wave. I think many people like these two things very much.
In the last development, httppage was used for rewriting to allow users to use simple URL-based on-demand media files. This playback page has the function of rating media files, the Web Service deployed on another server is called by Atlas. The problem is that the form action on the rewritten playback page is rewritten, but the service path registered by scriptmanager still calls the content registered by the real address. The result always reports an undefined service error.
After trying to change the form action with JS, I tried to write the service registration as hardcode (that is, writing it as a fixed address) one after another and ended with an error.
Review the entire call process and find that after urlrewrite is rewritten, all the methods on the page cannot be correctly executed except the methods on the page. Therefore, we want to transfer the WebService to the page, because Atlas can call the PAGE method. Then we did the following to copy the webmethod to the playback page. CS file (with the [webmethod] attribute), in the original Atlas call is similar to serivcetypename. use pagemethods instead of methodname. methodname (), re-open the page, everything is OK.
I hope it will be helpful for friends who like Atlas and use urlrewrite when encountering similar problems.