Integration of atlas and urlrewrite

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.