Base solution for your next web application

Activities of "admin@SYNTAQ"

ASPNETZERO 11.2 ASPNET Core MVC

We are seeing a very slow Authenticate method on the TokenAuthController when calling the CreateJwtClaims function from the Authenticate method. The method does complete successfully but can take up to 60 seconds to complete. Captcha is not enabled

        var accessToken = CreateAccessToken(await CreateJwtClaims(loginResult.Identity, loginResult.User,
            refreshTokenKey: refreshToken.key));

The line of code that takes a long time is in the CreateJwtClaims function

        await _userManager.AddTokenValidityKeyAsync(
            user,
            tokenValidityKey,
            expirationDate
        );

.Net Core, MVC Jquery, 11.2

Hi,

Email Sender has stopped sending emails. we have confirmed the account is correct and receive no errors back from the SendTestEmail function. It does not work in dev, test or Prod environments. If we add conventioanl .net code to send the email message then the email does get sent. You can see the sample working email code in the second code block.

Is there any configuration that can disable the email sender accidently? Can you suggest any reason the _emailsender my stop working? We have been using it with no issues previously. We have triple checked the account details on both configurations. There are no apparent changes we can identify between it working and not working

    // DOES NOT SEND EMAIL MESSAGE ////////////////////////////////////////////////////////////////////

    public async Task SendTestEmail(SendTestEmailInput input)
    {
        try
        {
            await _emailSender.SendAsync(
                input.EmailAddress,
                L("TestEmail_Subject"),
                L("TestEmail_Body")
            );
        }
        catch (Exception e)
        {
            throw new UserFriendlyException("An error was encountered while sending an email. " + e.Message, e);
        }
    }  


        // THIS DOES SEND THE EMAIL ////////////////////////////////////////////////////////////////////
        public async Task SendTestEmail(SendTestEmailInput input)
        {
            try
            {
                MailMessage message = new MailMessage();
                SmtpClient smtp = new SmtpClient();
                message.From = new MailAddress("xxxxxxxxxxxxx");
                message.To.Add(new MailAddress("xxxxxxxxxxxxx"));

                message.Subject = "Test";
                message.IsBodyHtml = true; //to make message body as html  
                message.Body = "Hello World";
 
                MailMessage mail = new MailMessage
                {
                    IsBodyHtml = true
                };
                
                smtp.Port = 25;
                smtp.Host = "in-v3.mailjet.com"; //for gmail host  
                smtp.EnableSsl = true;
                smtp.UseDefaultCredentials = false;
                smtp.Credentials = new NetworkCredential("xxxxxxxxxxxxxx", "xxxxxxxxxxxxxx");

                smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
                smtp.Send(message);

            }
            catch (Exception e)
            {
                throw new UserFriendlyException("An error was encountered while sending an email. " + e.Message, e);
            }
        }

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,

We have noticed that the account controller normaliseurl function is stripping out our return url if the user is logged in. This appears to be a change between 8.8 and 11.2. This is causing an issue for us as any returnurl on login does not work if the user is alreay loggedin. This scenario happens for our users when they click on an email and directed to a browser where they are already logged in.

We have removed the following code as it is causing a significiant production issue. But we would like to know if there is an impace somewhere else in theh system we should be aware off.

if (AbpSession.UserId.HasValue) { return defaultValueBuilder(); }

`
private string NormalizeReturnUrl(string returnUrl, Func

        if (returnUrl.IsNullOrEmpty())
        {
            return defaultValueBuilder();
        }

		if (AbpSession.UserId.HasValue)
		{
			return defaultValueBuilder();
		}

		if (Url.IsLocalUrl(returnUrl) || _webUrlService.GetRedirectAllowedExternalWebSites().Any(returnUrl.Contains))
        {
            return returnUrl;
        }

        return defaultValueBuilder();
    }` 

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()

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

Thanks,

What settings would you expect for the default.cshtml? Our git repo does not show any change to this file from stock. All of the Default.cshtml files for the themes have the same build settings.

Also, the issue goes away if we restart the server or wait (random length of time). If the file were not embeded correctly you would expect it to fail 100% of the time.

If you mean the FalconDefaultBrandViewComponent.cs It is not. It is odd as it has happened twice in approx 4 weeks and is fine if you restart the server. It dosn;t seem like a file has the wrong properties

Thanks,

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

<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

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'."

Showing 1 to 10 of 66 entries