Click here to Skip to main content
15,887,135 members
Home / Discussions / ASP.NET
   

ASP.NET

 
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 
GeneralRe: How to design data entry web app (C# VS 2015) Pin
Verdlin24-Oct-16 6:42
Verdlin24-Oct-16 6:42 
GeneralRe: How to design data entry web app (C# VS 2015) Pin
kmoorevs24-Oct-16 11:54
kmoorevs24-Oct-16 11:54 
AnswerChange Page Language Pin
Hakmeh Mohannad4-Oct-16 21:43
Hakmeh Mohannad4-Oct-16 21:43 
Questionimplementation digital signature with md5 hash in asp Pin
Member 127574633-Oct-16 22:28
Member 127574633-Oct-16 22:28 
AnswerRe: implementation digital signature with md5 hash in asp Pin
Nathan Minier4-Oct-16 1:20
professionalNathan Minier4-Oct-16 1:20 
QuestionHow do you hide a label, textbox and button on a form via yes/no toggle switch Pin
Bootzilla333-Oct-16 10:04
Bootzilla333-Oct-16 10:04 
AnswerRe: How do you hide a label, textbox and button on a form via yes/no toggle switch Pin
F-ES Sitecore3-Oct-16 23:27
professionalF-ES Sitecore3-Oct-16 23:27 
AnswerRe: How do you hide a label, textbox and button on a form via yes/no toggle switch Pin
Member 102180524-Oct-16 1:03
Member 102180524-Oct-16 1:03 
QuestionRDLC report header row visiblility issue .. Pin
Member 1178145530-Sep-16 1:59
Member 1178145530-Sep-16 1:59 
Rant[REPOST] RDLC report header row visiblility issue .. Pin
Richard Deeming30-Sep-16 2:22
mveRichard Deeming30-Sep-16 2:22 
QuestionGetting a HARD URL for Your own Action Pin
TheOnlyRealTodd29-Sep-16 20:49
professionalTheOnlyRealTodd29-Sep-16 20:49 

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.