Silverlight vs System.Diagnostics.Trace.WriteLine

Answered Silverlight vs System.Diagnostics.Trace.WriteLine

  • 9. srpna 2012 13:34
     
     

    Hi,

    How to I write to the Azure tracelog from Silverlight? In the backend web site I can use: System.Diagnostics.Trace.WriteLine but that is not possible from Silverlight.

    Anly ideas?

    Thanks Henrik

Všechny reakce

  • 9. srpna 2012 15:54
     
     Odpovědět

    Since the silver light is a client side object you cannot use azure diagnostics. For that matter even on premise also any traditional logging you would use cant be used in silverlight.

    If you would like to catpure the errors from silver light and want to store that in your server, you need to have a service call to your service which sends the error information to server and log that information whereever you want.

    It's not specific to azure, this is the pattern we need to follow to capture the error from silver light.

    There is a very good article written in code project. Just refer to it.

    Hope it helps



    Please mark the replies as Answered if they help and Vote if you found them helpful.

  • 10. srpna 2012 3:07
    Moderátor
     
     Navržená odpověď

    Hi,

    Veerendra is correct, as Silverlight is client-side application, if you want to store something in Windows Azure Diagnostics, you need create a service that hosted in Windows Azure Platform, and the Silverlight application need to access the service to enable Azure Diagnostics.

    Here you can find more information about Windows Azure Diagnostics:

    http://msdn.microsoft.com/en-us/library/windowsazure/hh411552.aspx

    Hope this helps.


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework

  • 10. srpna 2012 7:53
     
     

    Hi Veerendra,

    Thank you for you reply!

    Thanks Henrik