Rafael Zuniga, Stephen Cave
Summary:
The purpose of this lab is to test how reliable sessions allow for clients to survive interruptions in the network.
Procedure:
We begin by opening the solution in Chapter6/ReliableSessions/ under the labs folder. We compile and run it to make sure it is working:

Which it is, so next we check out the configuration files and notice that we have WSHttpBinding with session support set to true. After we've noticed that we modify the configuration for the client to support diagnostics by adding a diagnostics section to the system.ServiceModel section. We also add a system.diagnostics section which will allow us to create a service log. We run the host and client again and this time after clicking the button several times we end up with a clienttrace.svclog in the c:\logs directory. Opening up the log reveals:

Next we download TcpTrace from this cool looking site, modify the client configuration to use port 8080 instead of 8000, and the host to use 8000. Running the project again with TcpTrace recording we send the first message from the client, stop the trace when we're about to send the second message, allow the second message to attempt to go through, start TcpTrace quickly, and finally let the client close the proxy. This time viewing the log we can see that there was an error when the client was attempting to send:

We can see that the message was successfully sent after TcpTrace was enabled again since the activity in the left pane shows that subsequent messages were processed successfully.
Observations:
- Reliable sessions are easy to implement and are very useful if your application requires state retention
- I thought TcpTrace would be similar to Wireshark but instead it's a simple re-director, kinda cool
- Apparently there's a file association with svclog so you don't have to dig around looking for svctraceviewer.exe
No comments:
Post a Comment