000021721 - How to use Microsoft Visual Studio .NET 2003 to write RSA ACE/Server Administration API programs

Document created by RSA Customer Support Employee on Jun 16, 2016Last modified by RSA Customer Support Employee on Apr 21, 2017
Version 4Show Document
  • View in full screen mode

Article Content

Article Number000021721
Applies ToRSA ACE/Server 5.1 (no longer supported as of 7-14-2006)
RSA ACE/Server 5.2

RSA Authentication Manager 6.0

RSA ACE/Server Administration API
Microsoft Visual Studio .NET
IssueHow to use Microsoft Visual Studio .NET 2003 to write RSA ACE/Server Administration API programs
Cause
RSA ACE/Server and RSA Authentication Manager come with an example of how to use the 'C' Administration API; the sample build files show how this can be compiled using command lines, but shows no example for use with Microsoft Visual Studio .NET
Resolution

The following steps show a very simple example of using Microsoft Visual Studio .NET 2003 to create an application to use the RSA ACE/Server Administration API. Create a simple command line C++ program, for example:

 

 

Then, using the option to add existing items add the ace_api.lib and apiuser.h files to the project. These 2 files can be found at <INSTALLDIR>\utils\toolkit on the installed ACE/Server. This means your Solution Explorer should look like this:

 

 

 

 

Now you are ready to actually write the code. A simple example is shown below:

 

// DemoApp.cpp : Defines the entry point for the console application.

//

 

#include "stdafx.h"

#include "apiuser.h"

 

 

int _tmain(int argc, _TCHAR* argv[])

{

                int error = 0;  

                char buffer[MAX_RESULT_MSG_SIZE] = {0};

      error = Sd_ApiInit("","","1", buffer, MAX_RESULT_MSG_SIZE);

      error = Sd_AddSite("site_1",buffer, MAX_RESULT_MSG_SIZE);

                error = Sd_ApiEnd(buffer,MAX_RESULT_MSG_SIZE);

                return 0;

}

 

If you now build your project, you should get the following output:

 

------ Build started: Project: DemoApp, Configuration: Debug Win32 ------

 

Compiling...

DemoApp.cpp

Linking...

LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library

 

Build log was saved at "file://c:\Code\C\DemoApp\Debug\BuildLog.htm"

DemoApp - 0 error(s), 1 warning(s)

 

---------------------- Done ----------------------

Build: 1 succeeded, 0 failed, 0 skipped

 

This now means that your application is ready to run!

 

Various standard Visual Studio provisos apply, a common question arises about setting which folders Visual Studio should search to locate the .H and .LIB files. Some users may choose to update the global settings for Visual Studio under Tools | Options | Projects | VC++ Directories, and others may find it just as convenient to copy the apiuser.h and ace_api.lib files into the project folder.

 

Also, the warning about LIBCMT is a common warning when mixing C++ with standard 'C' libraries, but discussion about resolving this warning is well covered in standard Visual Studio documentation.

 

A variety of manuals are referenced in this solution for the specific version of RSA Authentication Manager, copies are supplied with the software and online copies are available in RSA SecurCare Online.

 

Authentication Manager 6.1 Administration Toolkit Reference Guide

https://knowledge.rsasecurity.com/docs/rsa_securid/rsa_auth_mgr/61/authmgr_admin_toolkit.pdf

 

Authentication Manager 6.0 Administration Toolkit Reference Guide

https://knowledge.rsasecurity.com/docs/rsa_securid/rsa_auth_mgr/60/ace_admin_toolkit_60.pdf

https://knowledge.rsasecurity.com/docs/rsa_securid/rsa_auth_mgr/61/authmgr_admin_toolkit.pdf 

ACE/Server 5.2 Administration Toolkit Reference Guide

https://knowledge.rsasecurity.com/docs/rsa_securid/rsa_ace_server/52/ace_admin_toolkit_52.pdf 

 

ACE/Server 5.1 Administration Toolkit Reference Guide

https://knowledge.rsasecurity.com/docs/rsa_securid/rsa_ace_server/51/ace_admin_toolkit_51.pdf

 

Other related solutions which might be useful:

 

 

     How to accessRSA Cookie API from Microsoft.NETa22141         How to accessRSA Cookie API from Microsoft.NETHow to access RSA Cookie API from .NET

     How to access the RSAACE/Server Admin API from Microsoft.NETa22689         How to access the RSAACE/Server Admin API from Microsoft.NETHow to access the RSA ACE/Server Admin API from Microsoft .NET

     How to access RSA ACE/Agent SDKsynchronous API from Microsoft.NETa22506         How to access RSA ACE/Agent SDKsynchronous API from Microsoft.NETHow to access RSA ACE/Agent SDK synchronous API from Microsoft .NET

     How to use RSACookieAPI from ASP.NET with RSA ACE/Agent 5.x for Weba26304         How to use RSACookieAPI from ASP.NET with RSA ACE/Agent 5.x for WebHow to use RSACookieAPI from ASP.NET with RSA ACE/Agent 5.x for Web

     How toutilize RSA ACE/Agent Authentication APIfrom an ASP.NET Applicationa22650         How toutilize RSA ACE/Agent Authentication APIfrom an ASP.NET ApplicationHow to utilize RSA ACE/Agent Authentication API from an ASP.NET application

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Legacy Article IDa24600

Attachments

    Outcomes