ASMX test page & remote machine access
Even though I love WCF, ASMX is not going away anytime soon. One of the things I like about ASMX is the auto-generated test web page (if you have simple types of course, not messages). At my current client, we develop a message based endpoint and also create a test web service (in the tempuri.org namespace so there is no confusion about which is the ‘correct’ service to call) with simple types so it is easy to try out the service. The other day, I created such a page to share with one of the project analysts who was writing requirements. I gleefully crufted up the ASMX service page using System.String as the input and sent the link to the analyst. However, I forgot the auto-generated test page works well on the local machine, but to use it remotely, additional configuration love is necessary.
So, a blog post seemed like a good way to ensure I never forget again (or if I do forget, an easy reference for me instead of having to Google the answer).
The error you see is: "The test form is only available for requests from the local machine."
MSDN forums had a link which helped to resolve the issue: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=451735&SiteID=1
“Put this in the <system.web> section of your web.config file. <webServices> <protocols> <add name="HttpSoap12"/> <add name="HttpSoap"/> <add name="HttpGet"/> <add name="HttpPost"/> </protocols> </webServices> Thanks to google and http://www.fincher.org/tips/Languages/csharp.shtml” |
|
I look forward to the day where WCF has this feature again J
jk