0

You'll have to pardon me if this is a dumb question - I'm trying to help out on a .NET project but I've never done any .NET

We have some Java-based REST services trying to do a GET with NTLM authentication to a .NET endpoint. What we are seeing is that requests that authentication show up in the log, but requests that fail do NOT show up in the log.

We want to see the failed requests in the log and if possible some sort of "reason" as to why they were rejected (bad NTLM domain, bad credentials, network failure to authentication service, etc.)

How do we do that?

Here's an extract from the code for the endpoint:

using System.Net.Http;
using System.Reflection;
using System.Web.Http;


[RoutePrefix("api/config")]
public sealed class ConfigController : ApiController {
    [HttpGet]
    [Route("version")]
    public IHttpActionResult GetVersion() {
        return Ok(Build.InformationalVersion);
    }
DaBlick
  • 898
  • 9
  • 21
  • Thanks for responding. The endpoint is implemented with System.web.http. We seem to be using something called "nlog" in that I see a tag in an App.config file. – DaBlick Aug 11 '16 at 14:52
  • The log file entries that are coming out (authorized requests) do not seem to be coming from explicit log statements. The endpoint I'm looking at is a one line method that returns a constant. The endpoint method is annotated with System.Web.Http.HttpGetAttribute. Are there multiple Http frameworks that use that? I would think that uniquely identifies the framework doing the wire listening. – DaBlick Aug 11 '16 at 15:01
  • [HttpGet] [Route("version")] public IHttpActionResult GetVersion() { return Ok(Build.InformationalVersion); } – DaBlick Aug 11 '16 at 15:02
  • Look, like I said: this code **does not log**. _Somewhere_ there's being configured, either through configuration or through code, that NLog should log successful requests. – CodeCaster Aug 11 '16 at 15:07

0 Answers0