Home > Net >  About the WCF service, some classes are not very understand, trouble which eldest brother you help m
About the WCF service, some classes are not very understand, trouble which eldest brother you help m

Time:10-13

 
Private Host As ServiceHost=Nothing
Private Sub button1_Click (ByVal sender As Object, ByVal As EventArgs e) Handles btn_ open service. Click
If the Host Is Nothing Then
The Host=New ServiceHost (GetType (A.S ervice1))
Dim httpBinding the As System. ServiceModel. Channels. Binding=New BasicHttpBinding ()
Host. AddServiceEndpoint (GetType (Anderson, Service1), httpBinding, "http://localhost:8002/")
Dim behaviors As ServiceMetadataBehavior=New ServiceMetadataBehavior ()
Behaviors. HttpGetEnabled=True
Behaviors. HttpGetUrl=New Uri (" http://localhost:8002/Service1 ")
The Host. The Description. Behaviors. The Add (Behaviors)
The Host. The Open ()
End the If
End Sub

ServiceHost class can't find the corresponding documentation, it began to WCF service key statements, which help me to comment it, what's the use of all,
He only pointing up here, and an A in the project Service1. Vb, if I have A lot of files, how to add? Or is a port can only corresponds to a file?
This is totally do not understand, please advise,
  • Related