none
Access a asmx web service anonymously without asking for credentails

    Question

  • Hi Experts,

    I created a webservice like this, http://host:port/Service1.asmx?op=LogSearch

    Is it possible to open a browser, hit the above URL and see the response, without entering any credentials. I dont care about security.

    Are there any web.config setting that will help me achieve this one?

    Thank you,


    Freddie Maize ..A story with Glory is History. Doesn’t matter whether Glory rest in the world of Demon or God. Lets create History..

    Wednesday, October 16, 2013 11:23 AM

Answers

  • Assuming you have exposed this web service through SharePoint URL, there is a way you can achieve this.  You just need to locate the root web.config file and enable "HttpPostLocalhost" and/or "HttpPost" (if you want to invoke this web service remotely).

    In SharePoint, web services usually are located in /_vti_bin/webservice.asmx.  And the directory that maps to this path is by default: "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\isapi" (again, assuming it's SharePoint 2010).  Just open the web.config file and you'll see the following section as default values:

    <webServices>
                <protocols>
                    <remove name="HttpGet" />
                    <remove name="HttpPost" />
                    <remove name="HttpPostLocalhost" />
                    <add name="Documentation" />
                </protocols>
            </webServices>

    Change it to:

    <webServices>
                <protocols>
                    <remove name="HttpGet" />
                    <add name="HttpPost" />
                    <add name="HttpPostLocalhost" />
                    <add name="Documentation" />
                </protocols>
            </webServices>

    Backup the default web.config file before making this change.  HTH!


    These postings are provided "AS IS" with no warranties, and confers no rights.

    Wednesday, October 16, 2013 11:36 AM