none
Calling service from web browser RRS feed

  • Question

  • Greetings,

    Issue: Getting "page not found" when attempting to invoke a method from a web browser but not from a test-client forms project. So I am looking for direction/suggestions and thinking it is something with the endpoint.

    Complete VS2013 solution on One Drive

    I did created a REST service using the exact same code in the above project and could retrieve data no problem.

    Thanks for taking the time to read this.


    Information:

    Using VS2013, created a WCF service with a Windows form test project. The service funs from the IDE "WCF Test Client" dialog fine. When attempting to run the service from a web browser with the Test Client running using

    http://localhost:8733/Design_Time_Addresses/MockedMenuLoader/Service1/

    I get the normal web page  

    Second link gives me (partial page) where GetMenuItems is the single method

     Attempt to invoke method (gets page not found)

    http://localhost:8733/Design_Time_Addresses/MockedMenuLoader/Service1/GetMenuItems

     

     


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

    Monday, September 8, 2014 7:13 PM

Answers

  • Hi Kevininstructor,

    I have downloaded your project and I did not found the service code which implements the service, but I saw that you have added the service reference to the following address:
    http://localhost:8733/Design_Time_Addresses/MockedMenuLoader/Service1/ .

    So this service is the WCF Soap Service, for the WCF Soap Service we can not invoke the method in the URI. Because the WCF Soap Service does not support the HTTP GET operation. If you want to implement it, please try to use the WCF Rest Service which support the GET, POST,PUT,DELETE operations.

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, September 9, 2014 7:58 AM
    Moderator

All replies

  • Hi Kevininstructor,

    I have downloaded your project and I did not found the service code which implements the service, but I saw that you have added the service reference to the following address:
    http://localhost:8733/Design_Time_Addresses/MockedMenuLoader/Service1/ .

    So this service is the WCF Soap Service, for the WCF Soap Service we can not invoke the method in the URI. Because the WCF Soap Service does not support the HTTP GET operation. If you want to implement it, please try to use the WCF Rest Service which support the GET, POST,PUT,DELETE operations.

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, September 9, 2014 7:58 AM
    Moderator
  • Hello Amy,

    I did create a REST version of the project prior to asking this question and it worked and was only after why (because this is how we learn) the WCF Soap version did not work which you have indicted which now makes sense. Thank you for this information.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

    Tuesday, September 9, 2014 11:34 AM