c# - unable to save log into windows azure table storage? -
i have used following code save trace log table storage. i'm using windows azure skd version 2.2
system.diagnostics.trace.traceerror("start log");
also added listener
in web.config
<system.diagnostics> <trace> <listeners> <add type="microsoft.windowsazure.diagnostics.diagnosticmonitortracelistener, microsoft.windowsazure.diagnostics, version=2.2.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" name="azurediagnostics"> <filter type="" /> </add> </listeners> </trace> </system.diagnostics>
also added code in webrole.cs
public override bool onstart() { startdiagnostics(); return base.onstart(); } private void startdiagnostics() { diagnosticmonitorconfiguration dmc = diagnosticmonitor.getdefaultinitialconfiguration(); timespan tsoneminute = timespan.fromminutes(1); // transfer logs storage every minute dmc.logs.scheduledtransferperiod = tsoneminute; // transfer verbose, critical, etc. logs dmc.logs.scheduledtransferloglevelfilter = loglevel.information; // start diagnostic manager given configuration. try { diagnosticmonitor.start("microsoft.windowsazure.plugins.diagnostics.connectionstring", dmc); } catch (exception exp) { } }
still getting error : 500 internal server error
can ensure have configured azure diagnostics correctly using instructions here. if still hit issue after retry can share storage account name (no keys please) configured , hitting error?
Comments
Post a Comment