Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/103.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Silverlight 4.0 Silverlight 4程序集中是否有WSDualHttpBinding?_Silverlight 4.0 - Fatal编程技术网

Silverlight 4.0 Silverlight 4程序集中是否有WSDualHttpBinding?

Silverlight 4.0 Silverlight 4程序集中是否有WSDualHttpBinding?,silverlight-4.0,Silverlight 4.0,我正在尝试连接到一个现有的Windows服务,该服务公开了几个WCF端点。我关心的是Silverlight4应用程序将与之对话的那个。这是服务的配置文件(至少是我们关注的部分): 我可以在Silverlight应用程序中生成服务引用,但由于服务的设置方式,我的ServiceReferences.ClientConfig文件如下所示: <configuration /> 但是,WSDualHttpBinding不在Silverlight 4程序集中。我错过什么了吗?如何在生成服务引用

我正在尝试连接到一个现有的Windows服务,该服务公开了几个WCF端点。我关心的是Silverlight4应用程序将与之对话的那个。这是服务的配置文件(至少是我们关注的部分):

我可以在Silverlight应用程序中生成服务引用,但由于服务的设置方式,我的ServiceReferences.ClientConfig文件如下所示:

<configuration />
但是,WSDualHttpBinding不在Silverlight 4程序集中。我错过什么了吗?如何在生成服务引用时获取要填充的ServiceReferences.ClientConfig,如何在Silverlight应用程序中获取对WSDualHttpBinding的引用,或者如何切换到其他绑定(PollingDuplexHttpBinding)?

类:

一种安全且可互操作的绑定,设计用于允许服务和客户端发送和接收消息的双工服务契约

名称空间:System.ServiceModel
程序集:System.ServiceModel(在System.ServiceModel.dll中)

这就是你要找的吗

如果添加对
System.ServiceModel
的引用,它应该可以工作。

类:

一种安全且可互操作的绑定,设计用于允许服务和客户端发送和接收消息的双工服务契约

名称空间:System.ServiceModel
程序集:System.ServiceModel(在System.ServiceModel.dll中)

这就是你要找的吗


如果您添加对
System.ServiceModel
的引用,那么它应该可以工作。

此绑定不在Silverlight框架中。只有最基本的绑定是。此绑定不在Silverlight框架中。只有最基本的绑定是。

这很奇怪。在我的Silverlight 4应用程序中,我已经确保它出现了大约7次,但它没有出现。它引用了c:\Program Files\Reference Assemblys\Microsoft\Framework\Silverlight\v4.0\System.ServiceModel.dll中的程序集,而不是:c:\Program Files\Reference Assemblys\Microsoft\Framework\v3.0\System.ServiceModel.dll中的程序集。这很奇怪。在我的Silverlight 4应用程序中,我已经确保它出现了大约7次,但它没有出现。它引用c:\Program Files\Reference Assemblys\Microsoft\Framework\Silverlight\v4.0\System.ServiceModel.dll中的程序集,而不是:c:\Program Files\Reference Assemblys\Microsoft\Framework\v3.0\System.ServiceModel.dll中的程序集
 Public Sub StartServiceHost()
      'Publish the Wcf Service endpoint.
      Try
        shRccUserInterface = New ServiceHost(Me._CsService)
        AddHandler shRccUserInterface.Faulted, AddressOf OnChannelFaulted
        AddHandler shRccUserInterface.Closed, AddressOf OnChannelClosed
        AddHandler shRccUserInterface.Opened, AddressOf OnChannelOpened
        AddHandler shRccUserInterface.Opening, AddressOf OnChannelOpening
        AddHandler shRccUserInterface.UnknownMessageReceived, AddressOf OnUnknownMessageReceived

        shRccUserInterface.Open()
        Me.blnServiceHostOpen = True
        RaiseEvent ServiceHostOpenEvent(Me)
      Catch exWcf As Exception
        log.Write_Error("CsGuiComm", "StartServiceHost()", exWcf)
        RaiseEvent SendUtaEmailEvent("Wcf Problem", exWcf.ToString, System.Net.Mail.MailPriority.High)
      End Try
    End Sub
<configuration />
Dim _RequestType As CustomerService.CsServiceReference.VehicleSearchType = CsServiceReference.VehicleSearchType.Badge
Dim strSearchValue As String = String.Empty

...

AddHandler _Client.GetVehicleCompleted, AddressOf OnFindVehicleCompleted
_Client.GetVehicleAsync(CurrentUserName(), strSearchValue, _RequestType)