Running applications outside of Server Admin
To run applications (UNICOM Intelligence Reporter, for example) outside of Server Admin, do this:
1 Log into a Distributed Property Management (DPM) server and retrieve the ASP.NET authentication ticket.
2 Encrypt the ticket using the public static string Encrypt(string s) method in the SPSSMR.Web.Utilities.DimCrypt class. The class is in DimensionNet.dll, which is in:
C:Program FilesCommon FilesIBMSPSSDataCollection7Server Admin
3 Invoke the desired application by requesting an URL, such as the following for UNICOM Intelligence Reporter:
http://<servername>/spssmr/reporter/reporter.application?proj=<project_name>&username=<user_name>&ticket=<encrypted_ticket>&ServiceUrl=http://<servername>/SPSSMR/reporter/reporter.application
Example
The following example .aspx file demonstrates the above steps:
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void btnLoader_Click(object sender, EventArgs e)
{
//-------------------------------------------------
// Both Insterviewer Server Administrator and the
// SPSSMR.DPM.Scripting assembly must be referenced
// to run the code below.
//-------------------------------------------------
string serverUrl = "http://<YOURSERVERNAME>";
SPSSMR.DPM.IAgent2 oAgent = SPSSMR.Web.Utilities.Agent.GetInstance();
if (oAgent.Login(user_name.Value.ToString(), user_pwd.Value.ToString(), null))
{
string encrypted_ticket = SPSSMR.Web.Utilities.DimCrypt.Encrypt(oAgent.Ticket);
string url = serverUrl + "/SPSSMR/Reporter/Reporter.application?proj=" +
project_name.Value.ToString() +
"&username=" + user_name.Value.ToString() +
"&ticket=" + HttpUtility.UrlEncode(encrypted_ticket) +
"&ServiceUrl" + "/SPSSMR/Reporter/Reporter.application";
Page.ClientScript.RegisterStartupScript(this.GetType(), "RunReporter",
"<script type='text/javascript'> document.location='" + url + "'<" + "/script>");
}
else
{
// Login failed
}
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Load Survey Reporter</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<br />
<br />
<asp:Table ID="Table1" runat="server" BorderStyle="None" Height="114px" Width="461px">
<asp:TableRow runat="server">
<asp:TableCell runat="server">Project:</asp:TableCell>
<asp:TableCell runat="server"><input runat="server" id="project_name" type="text"/>
</asp:TableCell>
</asp:TableRow>
<asp:TableRow runat="server">
<asp:TableCell runat="server">User name:</asp:TableCell>
<asp:TableCell runat="server"><input runat="server" id="user_name" type="text"/>
</asp:TableCell>
</asp:TableRow>
<asp:TableRow runat="server">
<asp:TableCell runat="server">Password:</asp:TableCell>
<asp:TableCell runat="server"><input runat="server" id="user_pwd" type="password"/>
</asp:TableCell>
</asp:TableRow>
</asp:Table>
<br />
<asp:Button ID="btnLoader" runat="server" Text="Run" Width="114px" OnClick="btnLoader_Click" />
</div>
</form>
</body>
</html>
See also