Bite my bytes

What I learn by day I blog at night - A blog from Microsoft Consultant working from Ljubljana, Slovenia

  Home :: Contact :: Syndication  
  999 Posts :: 7691 Comments :: 235 Trackbacks

Search

Most popular posts

Categories

My Projects

Archives

Stuff


Copyright © by David Vidmar
 
Contact me!
 
LinkedIn Profile
 
 
 

In version 1.0 of .NET Framework it was possible to test simple web services through web browser. In version 1.1 the feature was disable for remote sessions for obvious security reasons. It still works on localhost, but from remotemachine you only get "The test form is only available for requests from the local machine." message.

You can change that behaviour if you add following code to the <system.web> section.

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

You can similary turn off remote testing in framework 1.0:

<webServices>
  <protocols>
    <remove name="HttpPost" />
    <remove name="HttpGet" />
  </protocols>
</webServices>

Posted on Friday, July 16, 2004 11:48 AM | Filed under: Developement |

Feedback

# re: WebService test form from remote machine 2/21/2005 1:27 PM Andy UK
Very useful, thank you :)

# re: WebService test form from remote machine 2/28/2005 10:44 PM David
You are very welcome. :)

# re: WebService test form from remote machine 6/28/2005 9:19 AM Kal
very useful thanks

# re: WebService test form from remote machine 9/28/2005 8:04 PM Matt Petre
Yes, exactly what I was looking for, thank you.

# re: WebService test form from remote machine 9/28/2005 10:04 PM David
Glad I could help!

# re: WebService test form from remote machine 11/29/2005 3:27 PM Ruberoid
Thanks alot Pal. Beer from is me will be very useful for u!

# re: WebService test form from remote machine 12/1/2005 7:46 PM David
Beer is always welcome!

# re: Another related doubt: WebService test form from remote machine 12/12/2005 7:32 AM Zalak Dedhia
Is it possible to access the web service from a remote machine via a program (eg .NET web application) even if the above permission is not set in the web.config

# re: WebService test form from remote machine 12/13/2005 9:35 PM David
Of course.

# re: WebService test form from remote machine 2/20/2006 10:34 AM nkhhphuc
yeah, thanks alot!

# re: WebService test form from remote machine 5/25/2006 10:48 PM Rich
No, if you disable a protocol in web.config, it's disabled. I had a longer explanation, but I'm too dumb for your captcha, and it didn't retain my comment in the form.

# re: WebService test form from remote machine 9/26/2006 4:17 PM Rob B
I notice that sometimes .NET 1.1 can lie to you and say "The test form is only available for requests from the local machine" when it's because the current web method uses a complex datatype rather than base types like integer, string, etc. Other web methods work fine remotely.

PS. Fix the captcha thing so it retains comments in the edit box if you get it wrong. ;-) My pet hate is web forms losing data.

# re: WebService test form from remote machine 2/1/2007 5:33 PM Prash
Quick help..this is the first link in google search !!..Thank you :)

# re: WebService test form from remote machine 2/12/2007 9:55 PM Raghu
Great info .. thanks!

# re: WebService test form from remote machine 6/25/2007 2:35 PM Jandost Khoso
Excellent solution. Many thanks

# re: WebService test form from remote machine 9/12/2007 2:22 PM Anton Setiawan
Terimakasih banyak.....
thank you very much...............



# re: WebService test form from remote machine 10/11/2007 6:52 PM Felipe Orian
Thank you so much!!!
bye

# re: WebService test form from remote machine 10/29/2007 6:12 PM Bottle Rocket
Thanks a lot!

# re: WebService test form from remote machine 11/27/2007 9:22 PM Adrian GL
Muchas gracias!! from Argentina...;)

# re: WebService test form from remote machine 12/5/2007 7:24 AM samss.26
Hey Guys am here seriously struggling to consume a Web method using a Web application.
the process goes like this.

1. i've Created a Web Service and deployed it on my local machine.
2. I am happy that am able to access this web method from remote using .asmx and able to test it. But the problem occurs when i try to invoke it through a Web Application.
it fails with 'HTTP 404 Not Found' error.

3. My Web Method takes a string as input and returns a custom container Object.

One more thing When i add this as web reference to an application on my local machine process goes smooth without any hiccups. But problem have started coming up when i did the same thing on remote machine.

Any help would be highly appriciated.
Thanks,
Samss

# re: WebService test form from remote machine 12/5/2007 9:08 PM David
I believe one would need to see the code in order to help you.

# re: WebService test form from remote machine 12/12/2007 7:13 PM Roque Mocan
To samss:
If it is an 404 error it may seem that your application cannot find the Web Service on the other machine. I would check out in my client application (the one that will access the web service) that my Web Reference is Dynamic (so that it is controlled from the .config file of my application) and then check the app.config, web.config or corresponding config that it has the corresponding URL. If the URL points to a name, I often put the IP address instead of the name, because sometimes it is a name resolution problem...


# re: WebService test form from remote machine 12/29/2007 1:32 AM Dina
Muchisimas gracias desde Trux Peru

# re: WebService test form from remote machine 1/22/2008 3:23 PM Ehsan
Great! thankx....

# re: WebService test form from remote machine 3/3/2008 3:34 PM Maryan
thanks ..

# re: WebService test form from remote machine 3/8/2008 11:55 AM charles
thanks. very helpful!

# re: WebService test form from remote machine 4/8/2008 5:13 AM Matthew M.
Nice to be able to find things like this on the web. Great hint!!

- Matthew

# re: WebService test form from remote machine 6/30/2008 1:29 PM dinesh kumar
thanks

# re: WebService test form from remote machine 8/5/2008 11:19 AM Rahul
thx ...
very good info...

# re: WebService test form from remote machine 8/19/2008 1:24 AM Brazil F
thanks. you're my savior. exactly what i need.

# re: WebService test form from remote machine 8/25/2008 1:39 PM AS
Paji, tusee great ho

# re: WebService test form from remote machine 10/13/2008 5:25 PM David
I use SOAPbox from vordel. It is a tool to test your web services that is very useful and include lot of functionalities.
You can try it here : http://www.vordel.com/products/soapbox/

# re: WebService test form from remote machine 10/22/2008 12:45 AM Vicente Garcia
thanks from Mexico

# re: WebService test form from remote machine 11/10/2008 1:56 PM William
Have you experienced the test form returning the machine name rather than the domain name as the test form's action attribute? This seems to happen when the service is running on a web farm.

# re: WebService test form from remote machine 11/11/2008 6:23 AM Daniel
Hi, I have got a MS Access application calling web service and runing ok in local machine but not working in the server. Do you konw is there a way to debug that to find out the problem?

Cheers
Daniel

# re: WebService test form from remote machine 9/1/2009 10:27 PM Jorge Andrés Cañón Sierra
Thanks a lot, parceros.

From Colombia - Ibagué - Tolima.

# re: WebService test form from remote machine 9/1/2010 1:05 PM Site Ekle
Thanks ! That Was good and helpfull.

# re: WebService test form from remote machine 11/9/2010 9:03 PM darshna
Thanks for the info!!

# re: WebService test form from remote machine 4/13/2011 8:08 AM Anand Kumar
Thanks ! Exactly what i was looking for........

# re: WebService test form from remote machine 4/19/2011 11:09 AM Balaji
Thank you. It worked

# re: WebService test form from remote machine 7/26/2011 8:28 AM shrikant
Wow...I tried every time and its works always..lol..

# re: WebService test form from remote machine 9/22/2011 12:33 PM xyz
thanks a lot

# re: WebService test form from remote machine 10/18/2011 1:23 PM Raja Ram Patel
facing the same proble now i am trying the above solution

# re: WebService test form from remote machine 2/17/2012 7:41 AM Vicky
Very useful...

Comments have been closed on this topic.