c# - WCF, channel factory, and exceptions -
Using VS2008, vb.net, C #, FW 3.5 I'm your customer I am going to take my service service went hosted in IIS using client (WiFi form MDI) / L / R / CT, and sv. / N switch service and customer access to both a MyEntities.dll I nettcp I'm using mainly the proxy cache with TransportWithMessageCredential
< p> I have any prior use of its child forms / plugin If Membership.ValidateUser (UsernameTextBox.Text, PasswordTextBox.Text) _proxy = new MyServiceClient _proxy.ClientCredentials.UserName.UserName = "username" _proxy.ClientCredentials.UserName.Password = "password"
list (needs orders) = _proxy.ChannelFactory.CreateChannel.GetOrders (client) that
Everything is working very well but my questions are:
What happens to the channels after the call? Are they disposed magically?
How can I see it, with a professor?
Is there a way that I can control the error in one place or do I try / get caught in every call like
try {... client Close (); } Hold (communication exception e) {... client.Abort (); } Hold (Timeout Exception E) {... client.Abort (); } Hold (exception e) {... client.Abort (); throw; }
I can subscribe to _proxy.InnerChannel.Faulted and clean that there?
Depending on Regards
_Eric
Use Cases I used to do two different things:
- The client scenario, where I know that once only one instance of the channel is used, I make the lazy-one channel , And use the built-in example again. If this is a mistake, is closed or disposed, then the channel has been rebuilt.
- In a scenario where multiple channels can be requested at the same time, I think it is best to perform exception handling dancing. To save the order code, it is a way of realizing that it accepts a representative to do this work so that he can center around your payload code once in write-outs exclamation form .
Comments
Post a Comment