Search code examples
restiisasp.net-web-apiip-addresspublish

How consume rest service that was built using webapi in Visual Studio and published in IIS


I has built a REST service follow to tutorial https://www.youtube.com/watch?v=JeIE3jzAxHU

I has published it in IIS using Visual Studio. But I don't understand how consume it. In the sample that works under IIS Express it is called as localhost:port/api/person.
When I publish the service in IIS I see many compiled files but I do not understand what address I should call to get the same result as it was under IIS Express.


Solution

  • Try this to get url:

    • Open IIS
    • Expand out the left tree until you see Sites
    • Select the one you made for the demo
    • Click on Browse *:port under Browse Website heading on far right pane.

    That will give you the base site url for your testing, and just add api/person to it from there.

    Likely http://localhost/api/person, unless the demo was really weird. If you are unable to still browse the site, give us more information (errors?) or at least screenshots.