I'm trying to communicate with dlna compliant devices using a C#.net application, using the UPnP protocol. I'm using the default Visual studio UPnP library("UPnP 1.0 type library (control point)"). I list all rendering devices using UPNPDeviceFinder.FindByType. All works fine...
Now I get the AVTransport service using the function:
public UPnPService GetAVTransport(UPnPDevice mediaDevice)
{
foreach (UPnPService service in mediaDevice.Services)
{
Debug.Print(service.ServiceTypeIdentifier);
if (service.ServiceTypeIdentifier == "urn:schemas-upnp-org:service:AVTransport:1")
{
return service;
}
}
return null;
}
I try to send a play command to a device like so:
Service = GetAVTransport(Device);
object[] input = new object[2]
{
"0", // Object Id
"1" // Speed
};
object output = new object();
Service.InvokeAction("Play", input, ref output);
On the last line, i get the following error:
COMException: The owner of the PerUser subscription is not logged on to the system specified (Exception from HRESULT: 0x80040210)
What does this mean. It's totally unclear as to why this exception occurs.
Thanks, Thomas