Skip to main content
Home Forums Silverlight Programming Programming with .NET - General Monitor http traffic
6 replies. Latest Post by Dastei on August 11, 2008.
(0)
sahina
Member
7 points
6 Posts
08-08-2008 1:19 PM |
Can I monitor the http traffic on the page where a silverlight control is embedded? I want to do this with SIlverlight without writing any BHO or ActiveX controls for IE to do this... Is this possible with Silverlight?
Thanks
pbromberg
Contributor
2128 points
370 Posts
08-08-2008 3:14 PM |
I think there is an inherent "disconnect" around what you are asking to do. Remember, when you request a web page that hosts Silverlight content, Silverlight runs on the client in your browser, not on "the server" -- which is where you would be monitoring traffic. There are lots of tools to monitor HTTP traffic and log it including free ones like Google Analytics. But unless you only want Silverlight to retrieve and display such statistics, it is running in the "wrong place" to accomplish what you want.
08-08-2008 6:05 PM |
Hi Peter,
I apologize, I was not clear. I am trying to monitor the client traffic, not the server traffic. For a web page to be rendered, there will be multiple requests to various resources on page; such as images, css files, javascript files, etc... I want to monitor these requests before the page is rendered. I know that the Silverlight object is rendered as part of the page after all these resources are requested and the final html is rendered in browser.
I don't think what I am trying to do is possible with Silverlight but I wanted to ask anyway. May be I could get a pointer in the right direction.
The proxies such as Firebug (Firefox) and Web Development Helper (IE) does this but they are ActiveX (not sure how Firebug works in Firefox) controls. How can I achieve this kind of traffic http listening on a browser level?
sl.ayer
Participant
856 points
166 Posts
08-08-2008 6:25 PM |
Silverlight not gonna help you. You would need to write a browser plug-in or rather plugins since different browsers use different plug-in architecture.
nahidul
160 points
21 Posts
08-09-2008 1:32 AM |
hello,
you may know fire bug is open source! im just remind you again... if you want to do such thing go through the fire bug source you will get the idea behind it.
open source fire bug link below
http://code.google.com/p/fbug/
Yi-Lun L...
All-Star
25052 points
2,747 Posts
08-11-2008 3:57 AM |
Hello, the only solution without extra plug-in is to monitor the requests on the server, store the information in a session variable, and use a web service to return the data to your Silverlight application.
For example, if you're using ASP.NET, you can write some code in global.asax file to monitor every request.
Dastei
49 points
20 Posts
08-11-2008 5:13 AM |
I use Fiddler to watch my http traffic. Its a small .Net tool that works as proxy in every browser