Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Viewing message streams in Visual Studio for signalR chat application

I recently found a .NET tutorial that showed me how to make a simple chat application in Visual studio using the .NET library, signalr.

I have created the application and made a few moderations including some AES encryption. I have then hosted it on Windows Azure as a website.

The chat application works and has been tested, but I don't know how to view the messages sent from one user to the other.

Can someone tell me where I can find these message streams?

Thanks

like image 781
sMilbz Avatar asked Feb 07 '14 20:02

sMilbz


3 Answers

All messages will go through the SignalR Hub, so you could either use breakpoints/debugging to see what is send (if you are running in your development environment). Otherwise you could use tracing in the Hub to see the messages.

There is a extension to glimpse that you might use (I haven't tested it though): http://www.nuget.org/packages/Glimpse.SignalR

like image 168
Håkan Fahlstedt Avatar answered Nov 11 '22 16:11

Håkan Fahlstedt


You can get some performance counters using the tools provided by Microsoft.

For what I know there is no way to get all messages send or received from the server. When you need to analyze the communication of specific clients, try to use Wireshark or Microsoft Network Monitor.

You could also write your own message logger that writes them to file.

You can use common methods as Trace.WriteLine to write info to the default listener. Then use a listener to write to file / database.

This source may be useful when learning to analyze messages from a webserver.

like image 44
Patrick Hofman Avatar answered Nov 11 '22 16:11

Patrick Hofman


Fiddler is the best tool for monitoring web traffic. It's stupid easy to use and has a lot of extended features to help debug server/client applications. Take a look at this page which includes a brief description of using Fiddler with signalr.

Good luck!

like image 1
John Yost Avatar answered Nov 11 '22 16:11

John Yost