Wcf

GeordieJenner

Member
Licensed User
Longtime User
anybody done it. i have a WCF service running on my IIS, and wish to talk to it. Any examples would be appreciated.
 

GeordieJenner

Member
Licensed User
Longtime User
thank you
i see the parsing, just not seeing the WCF. Here is a small sample of my WCF connection back to the server:
Private Sub RetrieveInitialize()
clsGlobal.gEmail = txtEmailAddress.Text
clsGlobal.bcc.strDatabase = txtDatabase.Text
clsGlobal.bcc.strServer = "(local)"

Dim NCSoapClient = clsFunc.fnCreateTabletClient
AddHandler NCSoapClient.TabletInitializeCompleted, AddressOf RetrieveInitializeComplete
NCSoapClient.TabletInitializeAsync (clsGlobal.bcc,clsGlobal.ProtectedProviderID)
End Sub

Private Sub RetrieveInitializeComplete(ByVal sender As Object, ByVal e As program.SilverlightWcfTabletReference.TabletInitializeCompletedEventArgs)
Dim ti As TabletInitialize = e.Result
End Sub



Public Function fnCreateTabletClient() As SilverlightWCFTabletClient
Dim strService As String = "/Secure/SilverlightWCFTablet.svc"
Dim strHost As String = clsGlobal.bcc.strServer2 ' "https://www.mywebsite.com"

Dim NCSoapClient As SilverlightWCFTabletClient =
New SilverlightWCFTabletClient(CreateBinding(strHost),
New EndpointAddress(strHost & strService))

Return NCSoapClient
End Function



Public Shared Function CreateBinding(ByVal strHostName As String) As System.ServiceModel.Channels.Binding

Dim elements As New BindingElementCollection
elements.Add(New BinaryMessageEncodingBindingElement())

Dim htbe As HttpTransportBindingElement
If strHostName.ToUpper.Substring(0, 5) = "HTTPS" Then
htbe = New HttpsTransportBindingElement()
Else
htbe = New HttpTransportBindingElement()
End If

With htbe
.MaxBufferSize = 2147483647
.MaxReceivedMessageSize = 2147483647
End With

elements.Add(htbe)

Dim binding As New CustomBinding(elements)

'Create standard Silverlight Compatible Binding
'Dim binding As New BasicHttpBinding(BasicHttpSecurityMode.None)
With binding
.OpenTimeout = TimeSpan.FromMinutes(10)
.ReceiveTimeout = TimeSpan.FromMinutes(10)
.SendTimeout = TimeSpan.FromMinutes(10)
.CloseTimeout = TimeSpan.FromMinutes(10)
End With
Return binding
End Function
 
Upvote 0
Top