ASP.Net Web Service: The test form is only available for requests from the local machine.

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:

            <add name="HttpGet"/>
            <add name="HttpPost"/>

Click Here to Leave a Comment Below 16 comments
bespoke software - January 25, 2010

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

RM - August 9, 2010

Thanks for the solution. It worked for me too.

Martin - September 12, 2011


Mark Waser - March 19, 2012

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

Sridevi - July 3, 2014

thanks. solved my issue.

Meet Prajapati - August 29, 2014

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

George Varghese - October 14, 2014

this helped me a lot thanks.

Prajakta - December 16, 2014

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

    Mark Perry - April 17, 2015

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

haris rahmanto - January 6, 2015

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

Avinash Khapekar - August 5, 2015

thanks for ur help…good job 🙂

NIrmal - September 12, 2015

Thanks a lot…

Anand - April 1, 2016

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?

    Mark Perry - April 8, 2016

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

RCS - April 29, 2017

Thanks For Solution. It Works.


Leave a Reply: