Question Why not errors written to DB?

raysefo

Well-known member
Joined
Feb 22, 2019
Messages
361
Programming Experience
10+
Hello,

I have unhandled exception logger which logs every error into a table. Actually, it works but there is a rare condition when I do a load test with more than 1000 users, errors aren't written into this table. (950 success, 50 errors) Why could this happen? Any ideas? 50 users didn't even start for some reason?

C#:
public class UnhandledExceptionLogger : ExceptionLogger
    {
        public override void Log(ExceptionLoggerContext context)
        {
            var ex = context.Exception;

            string strLogText = "";
            strLogText += Environment.NewLine + "Source ---\n{0}" + ex.Source;
            strLogText += Environment.NewLine + "StackTrace ---\n{0}" + ex.StackTrace;
            strLogText += Environment.NewLine + "TargetSite ---\n{0}" + ex.TargetSite;

            if (ex.InnerException != null)
            {
                strLogText += Environment.NewLine + "Inner Exception is {0}" + ex.InnerException;//error prone
            }
            if (ex.Message != null)
            {
                strLogText += Environment.NewLine + "Message ---\n{0}" + ex.Message;//error prone
            }

            var requestedURi = (string)context.Request.RequestUri.AbsoluteUri;
            var requestMethod = context.Request.Method.ToString();
            var timeUtc = DateTime.Now;

            SqlErrorLogging sqlErrorLogging = new SqlErrorLogging();
            ApiError apiError = new ApiError()
            {
                Message = strLogText,
                RequestUri = requestedURi,
                RequestMethod = requestMethod,
                TimeUtc = DateTime.Now
            };
            sqlErrorLogging.InsertErrorLog(apiError);
        }
    }

C#:
public void InsertErrorLog(ApiError apiError)
        {
            using (var sqlConnection =
                new SqlConnection(ConfigurationManager.ConnectionStrings["GameContext"].ConnectionString))
            {
                try
                {
                    sqlConnection.Open();
                    using (SqlCommand cmd =
                        new SqlCommand(
                            "INSERT INTO [dbo].[API_Error] ([Message],[RequestMethod],[RequestUri],[TimeUtc]) VALUES (@Message, @RequestMethod, @RequestUri, @TimeUtc)",
                            sqlConnection))
                    {
                        cmd.Parameters.AddWithValue("@TimeUtc", apiError.TimeUtc);
                        cmd.Parameters.AddWithValue("@RequestUri", apiError.RequestUri);
                        cmd.Parameters.AddWithValue("@Message", apiError.Message);
                        cmd.Parameters.AddWithValue("@RequestMethod", apiError.RequestMethod);

                        cmd.ExecuteNonQuery();
                    }
                }
                catch (Exception e)
                {
                    throw e;
                }
                finally
                {
                    sqlConnection.Close();
                }
            }
        }
 
I have already read that post and the replies including the post by Benjamin Perkins. I am reaching a conclusion but I want to be sure before posting. As the logs do point to the OP's code as the source of the problem. But after enough research into this, I'm now on the fence on this one, and I do believe there is something else happening. @raysefo Are you using a http client, and If you have written one, can you share the settings for it? I believe something is closing your connections outside of your API calls. My codesmell radar is going nuts at the minute.

I don't think its something you've inadvertently wrote, but likely something you've missed/probably pasted inadvertently or a setting you failed to set properly. The only way to resolve that would be to trace where the issues reside. I provide a link to do that below. I also think you might have more than three concurrent issues. Clearly it seems that your connections are being closed outside the API calls which is causing your error log to overflow and that's causing its own issue in itself. Leaving us with two issues to fix if we can trace where the breakage is happening. Also, have you enabled failed request tracing rules in IIS? I believe this will help narrow down problems and may even identify what it causing these interruptions. See link below.

Edit : Clarity added - Apologies for the poorly worded reply. I'm having a rush day, and limited time to spare :)
 
Last edited:
Thank you @Sheepings.
Are you using a http client, and If you have written one, can you share the settings for it?
Yes, I am using http client in order to call 3rd party rest API. Here is how I am calling 3rd party rest API in my code:
C#:
namespace BusinessService.Utility
{
    public class Utilities
    {
        private static readonly HttpClient _httpClient = new HttpClient();

        //some code here
        
        public static async Task<HttpResponseMessage> CallRazer(GameRequest gameRequest, string url)
        {
            try
            {
                FormUrlEncodedContent content = null;

                if (url == "Product/")
                {
                    try
                    {
                        //Transform GameRequest into ProductDTO
                        var config =
                            new MapperConfiguration(cfg => { cfg.CreateMap<GameRequest, ProductRequestDto>(); });
                        var iMapper = config.CreateMapper();
                        var productRequest = iMapper.Map<GameRequest, ProductRequestDto>(gameRequest);

                        //Convert request
                        var keyValues = productRequest.ToKeyValue();
                        content = new FormUrlEncodedContent(keyValues);

                        //Call 3rd party API
                        var response = await _httpClient.PostAsync("https://test.com/" + url, content);
                        return response;
                    }
                    catch (Exception e)
                    {
                        Console.WriteLine(e);
                        throw;
                    }
                    finally
                    {
                        content.Dispose();
                    }
                }
                else
                {
                    try
                    {
                        //Convert request
                        var keyValues = gameRequest.ToKeyValue();
                        content = new FormUrlEncodedContent(keyValues);

                        //Call 3rd party API
                        var response = await _httpClient.PostAsync("https://test.com/" + url, content);
                        return response;
                    }
                    catch (Exception e)
                    {
                        Console.WriteLine(e);
                        throw;
                    }
                    finally
                    {
                        content.Dispose();
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                throw;
            }
        }

        
    }

    public static class ObjectExtensions
    {
        public static IDictionary<string, string> ToKeyValue(this object metaToken)
        {
            if (metaToken == null)
            {
                return null;
            }

            JToken token = metaToken as JToken;
            if (token == null)
            {
                return ToKeyValue(JObject.FromObject(metaToken));
            }

            if (token.HasValues)
            {
                var contentData = new Dictionary<string, string>();
                
                foreach (var child in token.Children().ToList())
                {
                    var childContent = child.ToKeyValue();
                    if (childContent != null)
                    {
                        contentData = contentData.Concat(childContent)
                            .ToDictionary(k => k.Key, v => v.Value);
                    }
                }

                return contentData;
            }

            var jValue = token as JValue;
            if (jValue?.Value == null)
            {
                return null;
            }

            var value = jValue?.Type == JTokenType.Date
                ? jValue?.ToString("o", CultureInfo.InvariantCulture)
                : jValue?.ToString(CultureInfo.InvariantCulture);

            return new Dictionary<string, string> {{token.Path, value}};
        }
    }
}

And here is how I call CallRazer:
C#:
namespace BusinessService
{
    public class GameServices : IGameServices, IDisposable
    {
        private readonly UnitOfWork _unitOfWork;

        public GameServices(UnitOfWork unitOfWork)
        {
            _unitOfWork = unitOfWork;
        }

        public async Task<HttpResponseMessage> GamePurchase(RequestDto requestDto)
        {
            HttpResponseMessage response = null;
            using (_unitOfWork)
            {
                response = await CallRazerService(requestDto);
                return response;
            }
        }

        private async Task<HttpResponseMessage> CallRazerService(RequestDto requestDto)
        {
            HttpResponseMessage response = null;

            //Transform DTO into GameRequest for calling Razer Initiate
            var config = new MapperConfiguration(cfg =>
            {
                cfg.CreateMap<RequestDto, GameRequest>();
                cfg.CreateMap<GameRequest, GameConfirmRequest>();
                cfg.CreateMap<GameConfirmResponse, GameConfirmResponseDto>();
                cfg.CreateMap<Coupon, CouponDto>();
                cfg.CreateMap<GameRequest, GameRequestDto>();
            });
            var iMapper = config.CreateMapper();
            var gameRequest = iMapper.Map<RequestDto, GameRequest>(requestDto);

            //Unique reference ID
            gameRequest.referenceId = Guid.NewGuid();

            var gameRequestDto = iMapper.Map<GameRequest, GameRequestDto>(gameRequest);

            //Create signature
            gameRequest = Utilities.CreateSignature(gameRequestDto, RequestType.Initiate);

            //Set service
            gameRequest.service = "RAZER";

            //Add initiation request into database
            _unitOfWork.GameRepository.Insert(gameRequest);

            #region Call Razer initiate/confirm

            //Call Razer for initiation
            response = await Utilities.CallRazer(gameRequest, "purchaseinitiation");

            //Read response
            var htmlResponse = await response.Content.ReadAsStringAsync();
            var gameResponse = JsonConvert.DeserializeObject<GameResponse>(htmlResponse);

            //Adding initiation response into database
            _unitOfWork.GameResponseRepository.Insert(gameResponse);

            if (gameResponse.initiationResultCode == "00")
            {
                gameRequestDto = iMapper.Map<GameRequest, GameRequestDto>(gameRequest);
                gameRequestDto.validatedToken = gameResponse.validatedToken;
                //Create signature
                var gameConfirmRequest = Utilities.CreateSignature(gameRequestDto, RequestType.Confirm);

                //Transform DTO into GameRequest for calling Razer Initiate
                var gameConfirmRequests = iMapper.Map<GameRequest, GameConfirmRequest>(gameConfirmRequest);

                //Add confirm request into database
                _unitOfWork.GameConfirmRequestRepository.Insert(gameConfirmRequests);

                //Call Razer for confirm
                response = await Utilities.CallRazer(gameConfirmRequest, "purchaseconfirmation");

                //Read response
                htmlResponse = await response.Content.ReadAsStringAsync();
                var gameConfirmResponse = JsonConvert.DeserializeObject<GameConfirmResponse>(htmlResponse);

                //Set service
                gameConfirmResponse.service = "RAZER";
                //Add confirm response into database
                _unitOfWork.GameConfirmResponseRepository.Insert(gameConfirmResponse);
            }

            #endregion

            await _unitOfWork.SaveAsync();

            return response;
        }

        
        public void Dispose()
        {
            _unitOfWork.Dispose();
        }
    }
}
 
That HttpClient on post #33 is an outbound HTTP client connection. The errors logged by IIS in HTTPERR logs are for inbound connections.
 
I made a load test with 2500 users and there are no errors. It is magical right :) But at the very beginning before the load test, I just made a request with Postman in order to see if the service running correctly, I got this error.

C#:
Message --- The remote name could not be resolved: 'test.com'
--- End Inner Exception ---
Message --- An error occurred while sending the request.

I asked the server admin if they did something, they said they did NOT do anything. And all of a sudden after a couple of minutes there was no such en error either :) Anyway, this was not a complete load test because the whole code didn't covered. (If portion did not run) Hopefully, a complete load test will be done tomorrow.

C#:
private async Task<HttpResponseMessage> CallRazerService(RequestDto requestDto)
        {
            HttpResponseMessage response = null;

            //Transform DTO into GameRequest for calling Razer Initiate
            var config = new MapperConfiguration(cfg =>
            {
                cfg.CreateMap<RequestDto, GameRequest>();
                cfg.CreateMap<GameRequest, GameConfirmRequest>();
                cfg.CreateMap<GameConfirmResponse, GameConfirmResponseDto>();
                cfg.CreateMap<Coupon, CouponDto>();
                cfg.CreateMap<GameRequest, GameRequestDto>();
            });
            var iMapper = config.CreateMapper();
            var gameRequest = iMapper.Map<RequestDto, GameRequest>(requestDto);

            //Unique reference ID
            gameRequest.referenceId = Guid.NewGuid();

            var gameRequestDto = iMapper.Map<GameRequest, GameRequestDto>(gameRequest);

            //Create signature
            gameRequest = Utilities.CreateSignature(gameRequestDto, RequestType.Initiate);

            //Set service
            gameRequest.service = "RAZER";

            //Add initiation request into database
            _unitOfWork.GameRepository.Insert(gameRequest);

            #region Call Razer initiate/confirm

            //Call Razer for initiation
            response = await Utilities.CallRazer(gameRequest, "purchaseinitiation");

            //Read response
            var htmlResponse = await response.Content.ReadAsStringAsync();
            var gameResponse = JsonConvert.DeserializeObject<GameResponse>(htmlResponse);

            //Adding initiation response into database
            _unitOfWork.GameResponseRepository.Insert(gameResponse);

            if (gameResponse.initiationResultCode == "00")
            {
                gameRequestDto = iMapper.Map<GameRequest, GameRequestDto>(gameRequest);
                gameRequestDto.validatedToken = gameResponse.validatedToken;
                //Create signature
                var gameConfirmRequest = Utilities.CreateSignature(gameRequestDto, RequestType.Confirm);

                //Transform DTO into GameRequest for calling Razer Initiate
                var gameConfirmRequests = iMapper.Map<GameRequest, GameConfirmRequest>(gameConfirmRequest);

                //Add confirm request into database
                _unitOfWork.GameConfirmRequestRepository.Insert(gameConfirmRequests);

                //Call Razer for confirm
                response = await Utilities.CallRazer(gameConfirmRequest, "purchaseconfirmation");

                //Read response
                htmlResponse = await response.Content.ReadAsStringAsync();
                var gameConfirmResponse = JsonConvert.DeserializeObject<GameConfirmResponse>(htmlResponse);

                //Set service
                gameConfirmResponse.service = "RAZER";
                //Add confirm response into database
                _unitOfWork.GameConfirmResponseRepository.Insert(gameConfirmResponse);
            }

            #endregion

            await _unitOfWork.SaveAsync();

            return response;
        }
 
I hate those "Fixed by magic" issues, especially when the network or machine admin claims they didn't change anything (but the session logs show that they were logged on to the machine for some reason).
 
"The remote name could not be resolved: 'test.com'" would be indicative on a DNS issue.
 
Since you don't show us the bodies of the methods you call within that if block, it's kind of hard to tell. How do we know if they are implemented correctly or not?

Also, with those await keywords there and not knowing what context your async method is being called, how will we know if any database connections that are being using within those method bodies that you are hiding do or do not have any thread affinities. In the past, I've seen people stash connection information in thread local storage and assume that they can clean up when the background worker thread terminates. It worked great until somebody thought: "Instead using a background worker thread, I'll use a thread pool so that I don't have to pay the cost of starting up any new threads", not realizing that the code they were using had thread affinity.
 
Sorry @Skydiver , Here is the if portion:
C#:
            if (gameResponse.initiationResultCode == "00")
            {
                gameRequestDto = iMapper.Map<GameRequest, GameRequestDto>(gameRequest);
                gameRequestDto.validatedToken = gameResponse.validatedToken;
                //Create signature
                var gameConfirmRequest = Utilities.CreateSignature(gameRequestDto, RequestType.Confirm);

                //Transform DTO into GameRequest for calling Razer Initiate
                var gameConfirmRequests = iMapper.Map<GameRequest, GameConfirmRequest>(gameConfirmRequest);

                //Add confirm request into database
                _unitOfWork.GameConfirmRequestRepository.Insert(gameConfirmRequests);

                //Call Razer for confirm
                response = await Utilities.CallRazer(gameConfirmRequest, "purchaseconfirmation");

                //Read response
                htmlResponse = await response.Content.ReadAsStringAsync();
                var gameConfirmResponse = JsonConvert.DeserializeObject<GameConfirmResponse>(htmlResponse);

                //Set service
                gameConfirmResponse.service = "RAZER";
                //Add confirm response into database
                _unitOfWork.GameConfirmResponseRepository.Insert(gameConfirmResponse);
            }

Here is create signature:
C#:
public class Utilities
    {
        private static readonly HttpClient _httpClient = new HttpClient();


        public static GameRequest CreateSignature(GameRequestDto game, GameServices.RequestType type)
        {
            var applicationCode = WebConfigurationManager.AppSettings["ApplicationCode"];
            var secretKey = WebConfigurationManager.AppSettings["SecretKey"];
            var version = WebConfigurationManager.AppSettings["Version"];
            string source = null;
            if (type == GameServices.RequestType.Initiate)
            {
                source = applicationCode + game.productCode + game.quantity + game.referenceId + version +
                         secretKey;
            }
            else if (type == GameServices.RequestType.Confirm)
            {
                source = applicationCode + game.referenceId + version + game.validatedToken + secretKey;
            }
            else
            {
                source = applicationCode + version + secretKey;
            }


            using (var md5Hash = MD5.Create())
            {
                var hash = GetMd5Hash(md5Hash, source);
                game.signature = hash;
                game.ApplicationCode = applicationCode;
                game.version = version;
            }

            //Transform GameRequest into ProductDTO
            var config = new MapperConfiguration(cfg => { cfg.CreateMap<GameRequestDto, GameRequest>(); });
            var iMapper = config.CreateMapper();
            var gameRequest = iMapper.Map<GameRequestDto, GameRequest>(game);

            return gameRequest;
        }
    //some code here

Here is call razer:
C#:
using System;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Text;
using System.Globalization;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
using System.Web.Configuration;
using AutoMapper;
using BusinessEntity;
using Newtonsoft.Json.Linq;

namespace BusinessService.Utility
{
    public class Utilities
    {
        private static readonly HttpClient _httpClient = new HttpClient();


        //some code here

        public static async Task<HttpResponseMessage> CallRazer(GameRequest gameRequest, string url)
        {
            try
            {
                FormUrlEncodedContent content = null;

                if (url == "Product/")
                {
                    try
                    {
                        //Transform GameRequest into ProductDTO
                        var config =
                            new MapperConfiguration(cfg => { cfg.CreateMap<GameRequest, ProductRequestDto>(); });
                        var iMapper = config.CreateMapper();
                        var productRequest = iMapper.Map<GameRequest, ProductRequestDto>(gameRequest);

                        //Convert request
                        var keyValues = productRequest.ToKeyValue();
                        content = new FormUrlEncodedContent(keyValues);

                        //Call Game Sultan
                        var response = await _httpClient.PostAsync("https://teststore.gamesultan.com/" + url, content);
                        return response;
                    }
                    catch (Exception e)
                    {
                        Console.WriteLine(e);
                        throw;
                    }
                    finally
                    {
                        content.Dispose();
                    }
                }
                else
                {
                    try
                    {
                        //Convert request
                        var keyValues = gameRequest.ToKeyValue();
                        content = new FormUrlEncodedContent(keyValues);

                        //Call Game Sultan
                        var response = await _httpClient.PostAsync("https://teststore.gamesultan.com/" + url, content);
                        return response;
                    }
                    catch (Exception e)
                    {
                        Console.WriteLine(e);
                        throw;
                    }
                    finally
                    {
                        content.Dispose();
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                throw;
            }
        }

        
    }

    public static class ObjectExtensions
    {
        public static IDictionary<string, string> ToKeyValue(this object metaToken)
        {
            if (metaToken == null)
            {
                return null;
            }

            JToken token = metaToken as JToken;
            if (token == null)
            {
                return ToKeyValue(JObject.FromObject(metaToken));
            }

            if (token.HasValues)
            {
                var contentData = new Dictionary<string, string>();
                
                foreach (var child in token.Children().ToList())
                {
                    var childContent = child.ToKeyValue();
                    if (childContent != null)
                    {
                        contentData = contentData.Concat(childContent)
                            .ToDictionary(k => k.Key, v => v.Value);
                    }
                }

                return contentData;
            }

            var jValue = token as JValue;
            if (jValue?.Value == null)
            {
                return null;
            }

            var value = jValue?.Type == JTokenType.Date
                ? jValue?.ToString("o", CultureInfo.InvariantCulture)
                : jValue?.ToString(CultureInfo.InvariantCulture);

            return new Dictionary<string, string> {{token.Path, value}};
        }
    }
}
 
I made a load test with one of my other methods. It works for 800 users if there are no records. (if (gameBankResult == null)) But if there are records, it starts to get errors. (600 success, 200 errors)
Here are the errors:
C#:
Message --- Timeout expired.  The timeout period elapsed prior to obtaining a connection from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached.
--- End Inner Exception ---
Message --- The underlying provider failed on Open.

C#:
Message --- Timeout expired.  The timeout period elapsed prior to obtaining a connection from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached.
--- End Inner Exception ---
Message --- The underlying provider failed on Open.

Sample FailedReqLogFile:
C#:
<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type='text/xsl' href='freb.xsl'?>
<!-- saved from url=(0014)about:internet -->
<failedRequest url="http://185.201.212.218:1907/api/v2/game/purchase"
               siteId="3"
               appPoolId="EPIN"
               processId="5548"
               verb="POST"
               remoteUserName=""
               userName=""
               tokenUserName="NT AUTHORITY\IUSR"
               authenticationType="anonymous"
               activityId="{00000000-0000-0000-0C00-00800120003F}"
               failureReason="STATUS_CODE"
               statusCode="500"
               triggerStatusCode="500"
               timeTaken="52946"
               xmlns:freb="http://schemas.microsoft.com/win/2006/06/iis/freb"
               >
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
 <System>
  <Provider Name="WWW Server" Guid="{3A2A4E84-4C21-4981-AE10-3FDA0D9B0F83}"/>
  <EventID>0</EventID>
  <Version>1</Version>
  <Level>4</Level>
  <Opcode>44</Opcode>
  <Keywords>0x0</Keywords>
  <TimeCreated SystemTime="2019-08-15T19:16:13.103Z"/>
  <Correlation ActivityID="{00000000-0000-0000-0C00-00800120003F}"/>
  <Execution ProcessID="5548" ThreadID="6288"/>
  <Computer>WINDOWS1</Computer>
 </System>
 <EventData>
  <Data Name="ContextId">{00000000-0000-0000-0C00-00800120003F}</Data>
  <Data Name="AuthType"></Data>
  <Data Name="UserName"></Data>
  <Data Name="SupportsIsInRole">true</Data>
 </EventData>
 <RenderingInfo Culture="en-US">
  <Opcode>USER_SET</Opcode>
 </RenderingInfo>
 <ExtendedTracingInfo xmlns="http://schemas.microsoft.com/win/2004/08/events/trace">
  <EventGuid>{D42CF7EF-DE92-473E-8B6C-621EA663113A}</EventGuid>
 </ExtendedTracingInfo>
</Event>
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
 <System>
  <Provider Name="WWW Server" Guid="{3A2A4E84-4C21-4981-AE10-3FDA0D9B0F83}"/>
  <EventID>0</EventID>
  <Version>1</Version>
  <Level>4</Level>
  <Opcode>43</Opcode>
  <Keywords>0x0</Keywords>
  <TimeCreated SystemTime="2019-08-15T19:16:13.103Z"/>
  <Correlation ActivityID="{00000000-0000-0000-0C00-00800120003F}"/>
  <Execution ProcessID="5548" ThreadID="6288"/>
  <Computer>WINDOWS1</Computer>
 </System>
 <EventData>
  <Data Name="ContextId">{00000000-0000-0000-0C00-00800120003F}</Data>
  <Data Name="OldHandlerName">ExtensionlessUrlHandler-Integrated-4.0</Data>
  <Data Name="NewHandlerName">System.Web.Http.WebHost.HttpControllerHandler</Data>
  <Data Name="NewHandlerModules">ManagedPipelineHandler</Data>
  <Data Name="NewHandlerScriptProcessor"></Data>
  <Data Name="NewHandlerType">System.Web.Http.WebHost.HttpControllerHandler, System.Web.Http.WebHost, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35</Data>
 </EventData>
 <RenderingInfo Culture="en-US">
  <Opcode>HANDLER_CHANGED</Opcode>
 </RenderingInfo>
 <ExtendedTracingInfo xmlns="http://schemas.microsoft.com/win/2004/08/events/trace">
  <EventGuid>{D42CF7EF-DE92-473E-8B6C-621EA663113A}</EventGuid>
 </ExtendedTracingInfo>
</Event>
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
 <System>
  <Provider Name="WWW Server" Guid="{3A2A4E84-4C21-4981-AE10-3FDA0D9B0F83}"/>
  <EventID>0</EventID>
  <Version>1</Version>
  <Level>5</Level>
  <Opcode>52</Opcode>
  <Keywords>0x0</Keywords>
  <TimeCreated SystemTime="2019-08-15T19:17:06.049Z"/>
  <Correlation ActivityID="{00000000-0000-0000-0C00-00800120003F}"/>
  <Execution ProcessID="5548" ThreadID="6288"/>
  <Computer>WINDOWS1</Computer>
 </System>
 <EventData>
  <Data Name="ContextId">{00000000-0000-0000-0C00-00800120003F}</Data>
  <Data Name="Reason">2</Data>
 </EventData>
 <RenderingInfo Culture="en-US">
  <Opcode>GENERAL_NOT_SEND_CUSTOM_ERROR</Opcode>
  <freb:Description Data="Reason">SETSTATUS_TRYSKIP</freb:Description>
 </RenderingInfo>
 <ExtendedTracingInfo xmlns="http://schemas.microsoft.com/win/2004/08/events/trace">
  <EventGuid>{D42CF7EF-DE92-473E-8B6C-621EA663113A}</EventGuid>
 </ExtendedTracingInfo>
</Event>
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
 <System>
  <Provider Name="WWW Server" Guid="{3A2A4E84-4C21-4981-AE10-3FDA0D9B0F83}"/>
  <EventID>0</EventID>
  <Version>1</Version>
  <Level>4</Level>
  <Opcode>35</Opcode>
  <Keywords>0x0</Keywords>
  <TimeCreated SystemTime="2019-08-15T19:17:06.049Z"/>
  <Correlation ActivityID="{00000000-0000-0000-0C00-00800120003F}"/>
  <Execution ProcessID="5548" ThreadID="6288"/>
  <Computer>WINDOWS1</Computer>
 </System>
 <EventData>
  <Data Name="ContextId">{00000000-0000-0000-0C00-00800120003F}</Data>
 </EventData>
 <RenderingInfo Culture="en-US">
  <Opcode>GENERAL_FLUSH_RESPONSE_START</Opcode>
 </RenderingInfo>
 <ExtendedTracingInfo xmlns="http://schemas.microsoft.com/win/2004/08/events/trace">
  <EventGuid>{D42CF7EF-DE92-473E-8B6C-621EA663113A}</EventGuid>
 </ExtendedTracingInfo>
</Event>
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
 <System>
  <Provider Name="WWW Server" Guid="{3A2A4E84-4C21-4981-AE10-3FDA0D9B0F83}"/>
  <EventID>0</EventID>
  <Version>1</Version>
  <Level>4</Level>
  <Opcode>47</Opcode>
  <Keywords>0x0</Keywords>
  <TimeCreated SystemTime="2019-08-15T19:17:06.049Z"/>
  <Correlation ActivityID="{00000000-0000-0000-0C00-00800120003F}"/>
  <Execution ProcessID="5548" ThreadID="6288"/>
  <Computer>WINDOWS1</Computer>
 </System>
 <EventData>
  <Data Name="ContextId">{00000000-0000-0000-0C00-00800120003F}</Data>
  <Data Name="Headers">Cache-Control: no-cache
Pragma: no-cache
Expires: -1
Server: Microsoft-IIS/8.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
</Data>
 </EventData>
 <RenderingInfo Culture="en-US">
  <Opcode>GENERAL_RESPONSE_HEADERS</Opcode>
 </RenderingInfo>
 <ExtendedTracingInfo xmlns="http://schemas.microsoft.com/win/2004/08/events/trace">
  <EventGuid>{D42CF7EF-DE92-473E-8B6C-621EA663113A}</EventGuid>
 </ExtendedTracingInfo>
</Event>
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
 <System>
  <Provider Name="WWW Server" Guid="{3A2A4E84-4C21-4981-AE10-3FDA0D9B0F83}"/>
  <EventID>0</EventID>
  <Version>1</Version>
  <Level>4</Level>
  <Opcode>36</Opcode>
  <Keywords>0x0</Keywords>
  <TimeCreated SystemTime="2019-08-15T19:17:06.049Z"/>
  <Correlation ActivityID="{00000000-0000-0000-0C00-00800120003F}"/>
  <Execution ProcessID="5548" ThreadID="6288"/>
  <Computer>WINDOWS1</Computer>
 </System>
 <EventData>
  <Data Name="ContextId">{00000000-0000-0000-0C00-00800120003F}</Data>
  <Data Name="BytesSent">276</Data>
  <Data Name="ErrorCode">0</Data>
 </EventData>
 <RenderingInfo Culture="en-US">
  <Opcode>GENERAL_FLUSH_RESPONSE_END</Opcode>
  <freb:Description Data="ErrorCode">The operation completed successfully.
 (0x0)</freb:Description>
 </RenderingInfo>
 <ExtendedTracingInfo xmlns="http://schemas.microsoft.com/win/2004/08/events/trace">
  <EventGuid>{D42CF7EF-DE92-473E-8B6C-621EA663113A}</EventGuid>
 </ExtendedTracingInfo>
</Event>
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
 <System>
  <Provider Name="WWW Server" Guid="{3A2A4E84-4C21-4981-AE10-3FDA0D9B0F83}"/>
  <EventID>0</EventID>
  <Version>1</Version>
  <Level>0</Level>
  <Opcode>2</Opcode>
  <Keywords>0x0</Keywords>
  <TimeCreated SystemTime="2019-08-15T19:17:06.049Z"/>
  <Correlation ActivityID="{00000000-0000-0000-0C00-00800120003F}"/>
  <Execution ProcessID="5548" ThreadID="6288"/>
  <Computer>WINDOWS1</Computer>
 </System>
 <EventData>
  <Data Name="ContextId">{00000000-0000-0000-0C00-00800120003F}</Data>
  <Data Name="BytesSent">276</Data>
  <Data Name="BytesReceived">418</Data>
  <Data Name="HttpStatus">500</Data>
  <Data Name="HttpSubStatus">0</Data>
 </EventData>
 <RenderingInfo Culture="en-US">
  <Opcode>GENERAL_REQUEST_END</Opcode>
 </RenderingInfo>
 <ExtendedTracingInfo xmlns="http://schemas.microsoft.com/win/2004/08/events/trace">
  <EventGuid>{D42CF7EF-DE92-473E-8B6C-621EA663113A}</EventGuid>
 </ExtendedTracingInfo>
</Event>
</failedRequest>

Even though 600 successful responses but in the database only 13 records updated. (_unitOfWork.GameBankRepository.Update(gameBankResult[k]);) Isn't it strange?

I couldn't post the method because of the limits.
 
Back
Top Bottom