Fiddler2 to debug SL
I have a SL3 + Ria service application that I want to trace what is are the calls made between the client and the server. Since I am开发者_如何学Go debugging the application in localhost, I am unable to see any trace in fiddler. I tried http://localhost.:port/websitename/page.aspx and I got "The requested URL could not be retrieved" message. If i remove '.' between localhost and port my page show up but there is no fiddler capture. How would one go about to see/capture all the calls made between the client and service in localhost? Thanks,
Because of fiddler's limitation, if you are using a port for the server's URL running on localhost, you'll need to create an entry on the hosts file. To do that, open notepad (or any text editor of your choice) with administrative privileges, and open the following file:
%WINDIR%\System32\drivers\etc\hosts
Then add on a new line the following:
127.0.0.1 [alias]
replace the "[alias]" string with a valid host name you want to use as alias and notice that the space between the IP address and the host name must be a single TAB. Finally update your service reference to use http://[alias]:port/websitename/page.aspx instead of localhost and there you go!
Notice that you'll need to restart the browser after updating the hosts file.
Hope you find this helpful!
Fiddler lets you capture traces from any executable running on your box. You should be able to just enable process level capture in Fiddler and get what you need. Look at the status bar down at the bottom... next to the capturing button. You can click on the Web Browsers button and change it to All Processes. You can also drag the Process Filter button that is on the top menu bar.
The answer to your question is in the middle of the First Run page that you saw when Fiddler was installed.
See http://www.fiddler2.com/fiddler/help/hookup.asp#Q-LocalTraffic for step-by-step instructions. You don't need to add anything to your HOSTS file.
精彩评论