I have a MSPL script that is "embedded" into a C# Application. running the MSPL Script directly on the Front End works fine but the deployment process is pretty complicated and lengthy. When I try the same with the C# App on the Front End I always get the following Exception
Application Not Authorized
Inner Exception: Queue could not be created.
This is my Code:
// Handler for MSPL Callbacks
LyncSIPHandler serverApplication = new LyncSIPHandler();
// Load the app manifest from a file.
ApplicationManifest manifest = ApplicationManifest.CreateFromFile("msplscript.am");
try {
manifest.Compile();
Util.Log(manifest.ApplicationUri);
}
catch (CompilerErrorException ex) {
Util.Log("#2 MSPL Compile: " + ex.Message);
}
ServerAgent agent = null;
try {
agent = new ServerAgent(serverApplication, manifest);
}
catch (Exception ex) {
Util.Log("#3 " + ex.Message);
}
The Exception is thrown when I try to create the ServerAgent
with the compiled Script.
The output of Log#1 (manifest.ApplicationUri) is [...URL...]/LyncToolApp
. When I run Get-CSServerApplication
on the Server (Lync 2013) I get the following output
Identity : Service:Registrar:[...server...]/LyncToolApp
Priority : 6
Uri : [...url...]/LyncToolApp
Name : LyncToolApp
Enabled : True
Critical : False
ScriptName :
Script :
What have I missed to make the App run?
Note: I was following this MSPL Tutorial.