Open topic with navigation
Enabling Web API
For added security, the AuctionWorx default site disables access to Web APIs. This topic shows how to enable the Web API using the Admin Control Panel, enable Web API for a user, and test the Web API access.
By default AuctionWorx performs three checks when a client requests a Web API resource. The checks occur in this order:
- Is Web API enabled, site-wide
- Is the current user authenticated
- Is Web API enabled for the current user
In other words for an authenticated user to access any Web API resource, Web API must be enabled site-wide and for the user.
When Web API is enabled site-wide, a user's Web API setting is checked during the authentication stage.
To enable Web API access site-wide
- Log in to AuctionWorx as an administrator.
- In the Admin Control Panel, navigate to the Setup page (Site Preferences > Setup).
- At the bottom of the preferences, check the item Enable Web API and then click Save.
To enable Web API access for a user
- In the Admin Control Panel, navigate to the Users Management page (Users > Management).
- Click the user for whom you want to enable Web API access.
- Click the Account Info tab.
- In the Status area near the bottom of the page, check Web API.
- Click Save.
To test the Web API access
By default, access to Web API services requires SSL. Follow these steps to confirm that Web API is available.
- In your RainWorx.FrameWorx.MVC project, in Solution Explorer, select the project root and click F4 to bring up the project Properties page.
- In the Properties window, note the designated secure (SSL) URL for the project as shown in the image . (Your URL may differ.)
- In Visual Studio, using the secure URL root, navigate to the /api/version, e.g. https://localhost:44301/api/version . Most browsers will issue a security warning as shown in the image.
- Proceed to the page. Depending on the browser and its setting, you will receive a the version number as a string or wrapped in XML tags. (
<string>100</string>
) .
Copyright © 2002-2022. RainWorx Software. All rights reserved.
Open topic with navigation