Click here to Skip to main content
16,010,153 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionKendo Grid Issues Pin
eejaynic12-Oct-16 11:29
eejaynic12-Oct-16 11:29 
AnswerRe: Kendo Grid Issues Pin
Vincent Maverick Durano17-Oct-16 9:12
professionalVincent Maverick Durano17-Oct-16 9:12 
QuestionRead xml string Pin
trungysp198610-Oct-16 14:36
trungysp198610-Oct-16 14:36 
AnswerRe: Read xml string Pin
Richard MacCutchan10-Oct-16 21:59
mveRichard MacCutchan10-Oct-16 21:59 
QuestionNeed help on how to insert yes/no toggle switch value into Sql table Pin
Bootzilla3310-Oct-16 10:17
Bootzilla3310-Oct-16 10:17 
SuggestionRe: Need help on how to insert yes/no toggle switch value into Sql table Pin
Richard MacCutchan10-Oct-16 22:00
mveRichard MacCutchan10-Oct-16 22:00 
AnswerRe: Need help on how to insert yes/no toggle switch value into Sql table Pin
Mycroft Holmes10-Oct-16 22:57
professionalMycroft Holmes10-Oct-16 22:57 
AnswerRe: Need help on how to insert yes/no toggle switch value into Sql table Pin
Richard Deeming11-Oct-16 2:21
mveRichard Deeming11-Oct-16 2:21 
AnswerRe: Need help on how to insert yes/no toggle switch value into Sql table Pin
ZurdoDev11-Oct-16 3:21
professionalZurdoDev11-Oct-16 3:21 
SuggestionSuggesion Pin
Zarak Ali7-Oct-16 22:27
Zarak Ali7-Oct-16 22:27 
GeneralRe: Suggesion Pin
Afzaal Ahmad Zeeshan7-Oct-16 23:43
professionalAfzaal Ahmad Zeeshan7-Oct-16 23:43 
GeneralRe: Suggesion Pin
Richard MacCutchan8-Oct-16 2:39
mveRichard MacCutchan8-Oct-16 2:39 
AnswerRe: Suggesion Pin
ZurdoDev10-Oct-16 9:48
professionalZurdoDev10-Oct-16 9:48 
GeneralRe: Suggesion Pin
mbb0111-Oct-16 4:12
mbb0111-Oct-16 4:12 
QuestionHow to adjust multiple textboxes in a row with browser window size Pin
Bootzilla336-Oct-16 12:35
Bootzilla336-Oct-16 12:35 
AnswerRe: How to adjust multiple textboxes in a row with browser window size Pin
Richard Deeming7-Oct-16 2:00
mveRichard Deeming7-Oct-16 2:00 
GeneralRe: How to adjust multiple textboxes in a row with browser window size Pin
Bootzilla3310-Oct-16 10:16
Bootzilla3310-Oct-16 10:16 
QuestionLog all request of Web API 2 (DelegatingHandler vs ActionFilterAttribute) Pin
Bastien Vandamme5-Oct-16 16:11
Bastien Vandamme5-Oct-16 16:11 
AnswerRe: Log all request of Web API 2 (DelegatingHandler vs ActionFilterAttribute) Pin
Richard Deeming6-Oct-16 4:29
mveRichard Deeming6-Oct-16 4:29 
If you want to log every request, then use the IIS log. That will include requests which might not be mapped to the Web API pipeline, and therefore wouldn't be picked up by a DelegatingHandler or action filter.

If you just want to log the Web API requests, then either a DelegatingHandler or an action filter will work. Neither is an "old" feature. However, if you want to log the request and response bodies as a single entry, the DelegatingHandler would be the better choice.
C#
protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
{
    var response = await base.SendAsync(request, cancellationToken);
    await LogAsync(request, response);
    return response;
}


If you just want trace logs for your code, have a look at Tracing in ASP.NET Web API 2[^].



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


QuestionHow to design data entry web app (C# VS 2015) Pin
Verdlin5-Oct-16 6:23
Verdlin5-Oct-16 6:23 
AnswerRe: How to design data entry web app (C# VS 2015) Pin
David Mujica5-Oct-16 10:30
David Mujica5-Oct-16 10:30 
GeneralRe: How to design data entry web app (C# VS 2015) Pin
Verdlin6-Oct-16 4:39
Verdlin6-Oct-16 4:39 
AnswerRe: How to design data entry web app (C# VS 2015) Pin
Nathan Minier6-Oct-16 1:17
professionalNathan Minier6-Oct-16 1:17 
GeneralRe: How to design data entry web app (C# VS 2015) Pin
Verdlin6-Oct-16 4:41
Verdlin6-Oct-16 4:41 
AnswerRe: How to design data entry web app (C# VS 2015) Pin
kmoorevs23-Oct-16 6:36
kmoorevs23-Oct-16 6:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.