Skip to content
Developerhome

APIWebSiteAnon Instructions

  Less than to read

How to use the APIWebSiteAnon solution

This guide will outline the steps to use APIWebSiteAnon solution. Before following this guide, you must read through the Windows Authentication guide on how to set up API access via Windows Authentication.

Once you have confirmed the API is up and you can return sites from your browser, you can use the APIWindowsClient solution to test and make calls to the API.

On your development machine

  1. Unzip the APIWebSiteAnon solution and open this in Visual Studio.
  2. Edit the APIClientFactory.cs class (this is in the Infrastructure folder)

  3. In the CreateNew method, change the BaseUrl to match your machine name and port of the web service

    Image

  4. Go to Build then Build Solution.

  5. Copy the APIWebSiteAnon folder (containing the web.config file and bin folder) to the C:\ on the target machine.

On your target machine

:

Tip: 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.

1. Create a new website:

  1. Right click on Sites in the tree node, and choose Add Website
  2. Enter a Site Name of WebSiteAnon
  3. Set the physical path to C:\inetpub (this is not really used and can be set to another folder if required)
  4. Set the port to 89
  5. Click OK

2. Enable Windows Authentication:

  1. Click on the new website in the tree node
  2. Double click on Authentication
  3. Right click on Windows Authentication and choose Enable

3. Set up the application pool:

  1. Click on Application Pools in the tree view
  2. Right click on the new application pool in the main window and choose Advanced Settings
  3. Ensure the .NET CLR Version is 4.0
  4. Make sure the Managed Pipeline Mode is Integrated
  5. Set the Identity to a Sage 200 user who has suitable roles and company access
  6. Click OK

4. Apply the self signed certificate to the website:

  1. Right click on the new website in the tree view and choose Edit Bindings
  2. Click Add
  3. The type should be https
  4. The port should be 289
  5. Set the SSL Certificate to the certificate you created for the web service
  6. Click OK
  7. Close the Site Bindings window

5. Add the Web Application:

  1. Right click on the new website in the tree view and choose Add Application
  2. The Alias should be WebSiteAnon
  3. The physical path should be C:\APIWebSiteAnon
  4. Click OK

6. Test Website

You should now be able to test the website by using a web browser and going to:

https://yourservername:288/WebSiteAnon.

The solution has options to GET sites and departments.

Image

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

Image

Next Steps

If you wish to make use of the APIWindowsClient solution, please follow the steps in this guide.

If you wish to make use of the APIWebSiteWindows solution, please follow the steps in this guide.