Extentrix Developer Network-Extentrix Web Services for Citrix Presentation Server
Extentrix Web Services Consumer using ASP.NET (Acrobat Reader)
Introduction
Requirements
Application Source Code
How to Call Extentrix Web Services
Application Edition 3.5 API using ASP.Net
Introduction
This sample shows how to invoke Extentrix Web Services for Citrix Presentation Server APIs using ASP.Net. It invokes one of the APIs (launchApplicationWithParameter).
Requirements
- To run this sample, you need Visual Web Developer Express Edition, VS with IIS or VS2005, Framework version 2.0
- Any web browser
- Security Requirements:
Enable Initialize and script ActiveX controls option. For Internet Explorer do the following:
A) From Internet Explorer, go to Tools >> Internet Options.
.png)
Figure 1
B) Select Security tab, go to Custom level.
.jpg)
Figure 2
C) Enable "Initialize and script ActiveX controls not marked as safe for scripting" option.

Figure 3
This is not an ASP.Net tutorial, so it will only briefly describe what the code does. We assumed the person who is reading this has a good knowledge of it.
Application Source Code
There are two main packages:
- Default.aspx.
This page is the main page in this sample; it represents a simulation to a download page, it contains a link to the Administrator’s Guide file in a .pdf format. It does the following:A) Firstly, it checks if the Acrobat Reader is installed on the client’s machine. If it is installed, the User’s Guide file will be opened using the installed Acrobat Reader on the client’s machine. Otherwise, we will use Extentrix Web Services for CPS to launch the Acrobat Reader published application on the presentation server using ICA client. In this way users will never be disconnected and the product license will be saved for need, which means saving money.
B) If the user checks Lunch in Browser checkbox, then the ICA content will be saved into the client’s machine and run using ICAWEB client ((com.citrix.JICA) applet). Check the java CodeBase URL for the presentation server.
C) Finally, if the user doesn’t check Lunch in Browser option, then the Administrator’s Guide will be opened using ICA client.
Browser.aspx.
This is the second page in this sample. It lunches the Administrator’s Guide file -in .PDF format -in browser, if the user checks Lunch in Browser checkbox from the previous page.
How to Call Extentrix Web Services
Application Edition 3.5 API using ASP.Net
- You need to add a web reference to Extentrix Web Services Application Edition by following these steps:
- You need to add the following Using statements to invoke the web services:
- You need to create an object from the created web service reference.ExtentrixServiceCitrixPS proxy = new
ExtentrixServiceCitrixPS(); - Create Credential object, and set its members.WindowsCredentials credentials = new WindowsCredentials(); credentials.Password = "demo"; credentials.UserName = "citrixdesktop"; credentials.Domain = "testdrive"; credentials.PasswordEncryptionMethod = 0; credentials.DomainType = 0;
- Invoke the web service.
string icaContent = proxy.LaunchApplicationWithParameter(application, filename, credentials, clientname, clientIP);
a. Right click your project node and select Add Web Reference as in Figure 4.
.jpg)
Figure 4
b. A window named “Add Web Reference” will appear. Add the URL of your Extentrix Web Services for Citrix Presentation Server in URL field and clickGO. You can use our published web service URL for test purposes: http://www.extentrix.com/webservices/3.5.0/ExtentrixServiceCitrixPS.asmx.
.png)
Figure 5
c. In Web reference name field, give a suitable name for the web reference and click Add Reference.