CEPM Dotnet Agent Guide
Deploying CEPM Agent in a .NET Application

Table Of Contents

Deploying CEPM Agent in a .NET Application


Deploying CEPM Agent in a .NET Application


CEPM .NET Agent API can be deployed in any .NET application, such as Windows application, console application, and web application.

To deploy the .NET Agent in the existing application:


Step 1 Unzip the distribution (CEPM_DotNetAgentV3.3.0.0_32b_NCache3.3.zip) in the required directory.

Step 2 Copy the following files from the unzipped directory into ...\ApplicationName\bin folder (for Windows and Web applications) or into ...\ApplicationName\bin\debug folder (for Console applications):

Com.Cisco.Agent.Pep.dll

Com.Cisco.Epm.Pap.dll

Log4net.dll

Log4net.xml

Log.config

pep_config.xml


Note You can download pep_config.xml file for your application from the PAP UI (choose Home > System Config > Application page and click Download Agent Config button for the chosen application). The downloaded pep_config.xml file may contain only the basic configuration parameters and may not carry the agent related tags. Hence, it is highly reccomended to make use of pep_config.xml file that is bundled in the build.)



Note The pep_config.xml and log.configure files must be updated according to your current requirement before proceeding toward final deployment of the .NET Agent. Refer to Appendix A, "Configuring pep_config.xml File" and Appendix B, "Configuring log.config File" for information about configuring these files.


Step 3 Launch Visual Studio, choose File > Open > Projects and open the required application in which you need to deploy the .NET Agent.

Step 4 In the Solution Explorer window, right-click References and click Add Reference.
The Add Reference window appears.

Figure 2-1 Add Reference

Step 5 Click Browse to choose the required component.

Step 6 Locate Com.Cisco.Agent.Pep.dll file.

Step 7 Click OK, which deploys the .NET Agent in the selected application.

Step 8 Add the following piece of code to define entitlements:

To utilize the old PEP APIs (which support only SOAP):

IAuthorizationManager manager = SoapAuthorizationManager.GetInstance();
bool result = manager.IsUserAccessAllowed
("Username","CEPMAgentTest:TestWebApp3:WebForm1","any");

To utilize the new PEP APIs (which support both HTTP and SOAP):

IAuthorizationManager manager = 
AuthorizationManagerFactory.GetInstance().GetAuthorizationManager();
bool result = manager.IsUserAccessAllowed
("Username","CEPMAgentTest:TestWebApp3:WebForm1","any");