Sage 200 - APIWebSiteAnon Instructions
Description

Before following this article, you must read through this article on how to set up API access via Windows Authentication.

Once you have confirmed you can return sites through your browser, please follow on the steps below.

Cause
Resolution
On your development machine
  • Unzip the APIWebSiteAnon solution and open this in Visual Studio
  • Open the APIClientFactory.cs class (this is located in the Infrastructure folder)
  • In the CreateNew method, change the BaseUrl to match your machine name and port of the web service



  • Go to Build then Build Solution.
  • Copy the APIWebSiteAnon folder (containing the web.config file and bin folder) to the C:\ on the target machine.


On your target machine
You will need to open up IIS Manager. You can do this by searching for inetmgr from the Search bar at the bottom of your screen.
  • You will need to create a new website:
    • Right click on Sites in the tree node, and choose Add Website
    • Enter a Site Name of WebSiteAnon
    • Set the physical path to C:\inetpub (this is not really used and can be set to another folder if required)
    • Set the port to 89
    • Click OK
  • You will need to now enable Windows Authentication
    • Click on the new website in the tree node
    • Double click on Authentication
    • Right click on Windows Authentication and choose Enable
  • You will need to set up the application pool
    • Click on Application Pools in the tree view
    • Right click on the new application pool in the main window and choose Advanced Settings
    • Ensure the .NET CLR Version is 4.0
    • Make sure the Managed Pipeline Mode is Integrated
    • Set the Identity to a Sage 200 user who has suitable roles and company access
    • Click OK
  • You now need to apply the self signed certificate to the website
    • Right click on the new website in the tree view and choose Edit Bindings
    • Click Add
    • The type should be https
    • The port should be 289
    • Set the SSL Certificate to the certificate you created for the web service
    • Click OK
    • Close the Site Bindings window
  • Add the Web Application
    • Right click on the new website in the tree view and choose Add Application
    • The Alias should be WebSiteAnon
    • The physical path should be C:\APIWebSiteAnon
    • Click OK

You should now be able to test the website by using a web browser to go to https://yourservername:289/WebSiteAnon. There are buttons to GET sites and departments.

Sites will return all the companies the Identity user has access to


Next Steps

To make use of the APIWindowsClient solution, please follow this article.

To make use of the APIWebSiteWindows solution, please follow this article.

Steps to duplicate
Related Solutions