Base solution for your next web application
Open Closed

api/services/app/Session/GetCurrentLoginInformations 500 #11284


User avatar
0
admin@SYNTAQ created

Prerequisites

Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

  • What is your product version? 11.2
  • What is your product type (Angular or MVC)? MVC
  • What is product framework type (.net framework or .net core)? .net Core

Hi,

Getting a 500 error on this ajax call in Production not in Dev. Any thoughts? Rest of page loads normally

"NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'https://PRODURL/api/services/app/Session/GetCurrentLoginInformations'."


9 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Could you check if you have any errors on the server side log file (under App_Data/Logs folder) ?

  • User Avatar
    0
    admin@SYNTAQ created
    <Event>
        <System>
            <Provider Name=".NET Runtime"/>
            <EventID>1026</EventID>
            <Level>1</Level>
            <Task>0</Task>
            <Keywords>Keywords</Keywords>
            <TimeCreated SystemTime="2022-10-03T02:49:36Z"/>
            <EventRecordID>799541265</EventRecordID>
            <Channel>Application</Channel>
            <Computer>pd1sdwk00001B</Computer>
            <Security/>
        </System>
        <EventData>
            <Data>Application: dotnet.exe
    

    CoreCLR Version: 6.0.822.36306 .NET Version: 6.0.8 Description: The process was terminated due to an unhandled exception. Exception Info: System.Net.Sockets.SocketException (10013): An attempt was made to access a socket in a way forbidden by its access permissions. at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName) at System.Net.Sockets.Socket.Listen(Int32 backlog) at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind() at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportFactory.BindAsync(EndPoint endpoint, CancellationToken cancellationToken) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.TransportManager.BindAsync(EndPoint endPoint, ConnectionDelegate connectionDelegate, EndpointConfig endpointConfig, CancellationToken cancellationToken) at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.<>c__DisplayClass30_01.&lt;&lt;StartAsync&gt;g__OnBind|0&gt;d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context, CancellationToken cancellationToken) at Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions.BindAsync(AddressBindContext context, CancellationToken cancellationToken) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.AddressesStrategy.BindAsync(AddressBindContext context, CancellationToken cancellationToken) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IEnumerable1 listenOptions, AddressBindContext context, CancellationToken cancellationToken) at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.BindAsync(CancellationToken cancellationToken) at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken) at Microsoft.AspNetCore.Hosting.WebHost.StartAsync(CancellationToken cancellationToken) at Microsoft.AspNetCore.Hosting.WebHostExtensions.RunAsync(IWebHost host, CancellationToken token, String startupMessage) at Microsoft.AspNetCore.Hosting.WebHostExtensions.RunAsync(IWebHost host, CancellationToken token, String startupMessage) at Microsoft.AspNetCore.Hosting.WebHostExtensions.RunAsync(IWebHost host, CancellationToken token) at Microsoft.AspNetCore.Hosting.WebHostExtensions.Run(IWebHost host) at Syntaq.Falcon.Web.Startup.Program.Main(String[] args) in D:\Repos\Syntaq.Falcon\src\Syntaq.Falcon.Web.Mvc\Startup\Program.cs:line 13

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    This shows that your web app is not started correctly. Is it possible that the port is already in use ?

  • User Avatar
    0
    admin@SYNTAQ created

    Thanks,

    Everything runs as normal - but jsut this one method seems to be the one that fails.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Does that happen everytime when you run the app ? If so, is it possible to share your project with [email protected] so we can check and fix it for you ?

    Thanks,

  • User Avatar
    0
    admin@SYNTAQ created

    It happens everytime we load a view. The error is always throw fromscript below in the common-scripts file. Not able to share the code sorry

    The excat error we get is "NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'https://XXXXXXXXXX/api/services/app/Session/GetCurrentLoginInformations'."

    var app = app || {}; (function () { abp.services.app.session.getCurrentLoginInformations({ async: false }).done(function (result) { app.session = result; }); })();

    If { async: false } is changed to { async: true } the error is not throw. Is there any negative impact changing this to true? Does this provide any further light on the issue?

    Cheers

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    That is strange. If you use async: true, this code block may be completed before any other code block which uses the result of getCurrentLoginInformations. If you don't see such a case, you can use async: true.

  • User Avatar
    0
    admin@SYNTAQ created

    I think the above error is being cuased by general slow running of the system. This is specific to one environment which has no apparent difference.

    We are seeing a socket wrror in this environment

    WARN 2022-10-07 03:45:25,640 [33 ] c.Auditing.HttpContextClientInfoProvider - System.Net.Sockets.SocketException (11001): No such host is known. at System.Net.Dns.GetHostEntryOrAddressesCore(IPAddress address, Boolean justAddresses, AddressFamily addressFamily, ValueStopwatch stopwatch) at System.Net.Dns.GetHostEntry(IPAddress address) at Abp.AspNetCore.Mvc.Auditing.HttpContextClientInfoProvider.GetComputerName() WARN 2022-10-07 03:45:26,487 [33 ] c.Auditing.HttpContextClientInfoProvider - System.Net.Sockets.SocketException (11001): No such host is known. at System.Net.Dns.GetHostEntryOrAddressesCore(IPAddress address, Boolean justAddresses, AddressFamily addressFamily, ValueStopwatch stopwatch) at System.Net.Dns.GetHostEntry(IPAddress address) at Abp.AspNetCore.Mvc.Auditing.HttpContextClientInfoProvider.GetComputerName() WARN 2022-10-07 03:45:27,346 [30 ] c.Auditing.HttpContextClientInfoProvider - System.Net.Sockets.SocketException (11001): No such host is known. at System.Net.Dns.GetHostEntryOrAddressesCore(IPAddress address, Boolean justAddresses, AddressFamily addressFamily, ValueStopwatch stopwatch) at System.Net.Dns.GetHostEntry(IPAddress address) at Abp.AspNetCore.Mvc.Auditing.HttpContextClientInfoProvider.GetComputerName()

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Could you share Abp NuGet package version you are using ? There was a problem related to this (GetComputerName method) but it fixed in the one of the recent releases.