You create a very cool ASP.Net Web Service on your local machine. You are ready to show the world, you deploy it on the server. Then you get the following message "The test form is only available for requests from the local machine. " Here is what you need to fix that.

Open the web config file and add the following, you will be able to access the form outside of the localhost:

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

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This Post Has 16 Comments

  1. bespoke software

    That was an inspiring post,
    This is great ASP.Net Web Service advice,
    Keep up the good work

  2. RM

    Thanks for the solution. It worked for me too.

  3. Martin

    Thanks!

  4. Mark Waser

    This only solved the problem for some of the functions. Any function with an XML input still has the message. All others work perfectly. 🙁

  5. Sridevi

    thanks. solved my issue.

  6. Meet Prajapati

    i want just source code. plz provide it to me..its urgent

    1. Mark Perry

      Source code?

  7. George Varghese

    this helped me a lot thanks.

  8. Prajakta

    I am facing same issue with webservice. So i tried solution given here but still issue persist.
    Any idea how to get it work

    1. Mark Perry

      Can you email us more of an example of your issue?

  9. haris rahmanto

    Terima kasih banyak.. (Bahasa Indonesia),
    it’s mean Thank you very much..

  10. Avinash Khapekar

    thanks for ur help…good job 🙂

  11. NIrmal

    Thanks a lot…

  12. Anand

    In my case, I have 2 asmx files in a csproj. In one asmx file, I am able to Invoke Web Methods but getting the same error (The test form is only available for requests from the local machine.) for other file.
    Can you please let me know whether any other setting needs to be changed?

    1. Mark Perry

      Hmmm.. In my project I have two asmx files as well. But have no issues.

  13. RCS

    Thanks For Solution. It Works.