My blog has moved! Redirecting…

You should be automatically redirected. If not, visit http://www.digitalfugu.com/blog/ and update your bookmarks.

Friday, May 25, 2007

Access ASP.Net Web Service test pages remotely

I strongly dislike having to RDP into our webserver, thereby tying up an RDP session (only 2 in remote admin mode), to test webservices via the automatically generated test pages to debut whether our app is consuming the data wrong, or the web services are returning the wrong data.

If security is not a concern then you can enable the HTTP-POST and HTTP-GET protocols so that you can get to the test pages remotely not having to be localhost.

From MSDN:

HTTP GET and HTTP POST may be enabled by editing the Web.config file for the vroot where the Web service resides. The following configuration enables both HTTP GET and HTTP POST:

<configuration>
<system.web>
<webservices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
</protocols>
</webservices>
</system.web>
</configuration>

Alternatively, you can enable these protocols for all Web services on the computer by editing the section in Machine.config. The following example enables HTTP GET, HTTP POST, and also SOAP and HTTP POST from localhost:

<protocols>
<add name="HttpSoap"/>
<add name="HttpPost"/>
<add name="HttpGet"/>
<add name="HttpPostLocalhost"/>
<!-- Documentation enables the documentation/test pages -->
<add name="Documentation"/>
</protocols>

No comments: