locked
ControlChannelTrigger WaitForPushEnabled always throw Exception RRS feed

  • Question

  • Hi everyone.

    I'm try to run ControlChannelTrigger StreamSocket sample

    code.msdn.microsoft.com/windowsapps/ControlChannelTrigger-TCP-20c56711

    but it always throw Exception.

    Error at line: status = channel.WaitForPushEnabled();
    Detail:
    {System.Exception: The attempted operation is not supported for the type of object referenced. (Exception from HRESULT: 0x8007273D)
       at Windows.Networking.Sockets.ControlChannelTrigger.WaitForPushEnabled()
       at StreamSocketTransportHelper.CommModule.<RegisterWithControlChannelTriggerHelper>d__1.MoveNext() in d:\Projects\Microsoft Visual Studio 2012\Windows 8\ClientStreamSocketEx\StreamSocketTransportHelper\CommModule.cs:line 209}

    If anyone knows, please help me.
    Thank you so much.
    Friday, January 3, 2014 2:49 PM

Answers

  • What address did you specify in the "server hostname" text box? Are you sure you are running the sample in two different machines?
    • Marked as answer by Huy Hung Thai Saturday, January 4, 2014 4:22 AM
    Friday, January 3, 2014 7:48 PM

All replies

  • When are you calling this? Is the network connection already established?

    Friday, January 3, 2014 4:30 PM
    Moderator
  • Hi Rob.
    Here is debugOutputTextBlock Text:

    1/4/2014 12:11:09 AM Lock screen statusAllowedWithAlwaysOnRealTimeConnectivity
    1/4/2014 12:11:24 AM Deleting Background Task Network change task
    1/4/2014 12:11:24 AM RegisterWithCCTHelper Starting...
    1/4/2014 12:11:24 AM Create ControlChannelTrigger ...
    1/4/2014 12:11:24 AM Calling UsingTransport() ...
    1/4/2014 12:11:24 AM Connected
    1/4/2014 12:11:24 AM RegisterWithCCTHelper failed with: The attempted operation is not supported for the type of object referenced. (Exception from HRESULT: 0x8007273D)
    1/4/2014 12:11:24 AM Failed to sign on and connect
    1/4/2014 12:11:24 AM CommModule setup result: False

    I call in async Task<bool> RegisterWithControlChannelTriggerHelper(string serverHostName, string serverPort) like Example Project.
    I just run example project.
    Friday, January 3, 2014 5:17 PM
  • What address did you specify in the "server hostname" text box? Are you sure you are running the sample in two different machines?
    • Marked as answer by Huy Hung Thai Saturday, January 4, 2014 4:22 AM
    Friday, January 3, 2014 7:48 PM
  • Hi Stankiewicz.
    At first I running in one machine.
    When you said that, i try to run in two different machines.
    The problem has been solved.
    Thank you so much!
    Saturday, January 4, 2014 4:22 AM