Base solution for your next web application

Activities of "pankajmathur"

Question

Hi,

Could you please send me the github path for the detailed release notest of ASPNET ZERO v5.6

Regards, Mahendra

Question

Hi,

We were running ABP Zero (JQuery version) having ABP Version 3.6.2. There was some out of memory exception and we thought better to upgrade to ABP 3.7.2 so we did that. After upgrade to 3.7.2, we started facing a strange following issue.

Issue


At any point of time any page becomes unresponsive and give 500 error. In the network tab of chrome developer tool, we saw that pressing F5 does not even send a request to the server. After doing analysis, we found following two workarounds to resolves the issue.

  1. Close the chrome completely (I mean not just the opened tab of chrome, rather entire chrome window).
  2. Don't close the chrome, rather simply delete the cookie called "AspNetCore.Identity.Application".

To avoid above unresponsive we thought better to rollback to ABP Version 3.6.2. We did that but now on every page we get "An Internal Error" and this error is at the following line of code.

Class - NotificationAppService.cs Method - public async Task<GetNotificationsOutput> GetUserNotifications(GetUserNotificationsInput input)

In the above method, it successfully executes to get the totalCount and unreadCount. But when it tries to execute the next line that is var notifications = await _userNotificationManager.GetUserNotificationsAsync( AbpSession.ToUserIdentifier(), input.State, input.SkipCount, input.MaxResultCount );

it throws some exception related to something like assembly 3.7.2 not found. We are surprised when we already rolled back to 3.6.2 why in the above line it is somehow referring to 3.7.2

Please help by either resolving the unresponsiveness issue in 3.7.2 Or help to fix the notification issue in 3.6.2....

We are badly stuck.

Regards, Mahendra

Question

Hi,

We have recently upgraded the ABP to version 3.7.2. through Nuget. We are facing a strange issue even at localhost. (and same at azure)

Issue


If one of my page remains open for quite some time (not exactly sure how long) then if I press F5 to refresh the page, we receive 500 error. In the network tab of chrome developer tool, we saw that pressing F5 does not even send a request to the server.

What is the workaround currently


We saw following two workarounds to overcome the above unresponsive situation:

  1. Close the chrome completely (I mean not just the tab of chrome, rather entire chrome window).
  2. Don't close the chrome, rather simply delete the cookie called "AspNetCore.Identity.Application".

Could you please advice what is going wrong here, so that we don't have to do any workaround.

Question

Hi,

I have downloaded the sample oData project from <a class="postlink" href="https://github.com/aspnetboilerplate/sample-odata">https://github.com/aspnetboilerplate/sample-odata</a> I re-stored all the nuget packages.

Now when I run the Update-Database command from package manager console, it throws the following error:

No migrations configuration type was found in the assembly 'AbpODataDemo.EntityFramework'. (In Visual Studio you can use the Enable-Migrations command from Package Manager Console to add a migrations configuration).

Please advise....

Question

Hi,

I am using Hangfire for background job.

public override void Execute(GeneratePayloadAndSendToMobileArgs generatePayloadAndSendToMobileArgs)
        {

            Task SendDataToMobileTask = Task.Run(() => SendDataToMobile(generatePayloadAndSendToMobileArgs));
            SendDataToMobileTask.Wait();
        }

private async Task SendDataToMobile(GeneratePayloadAndSendToMobileArgs generatePayloadAndSendToMobileArgs)
        {
            try
            {
                using (_abpSession.Use(generatePayloadAndSendToMobileArgs.TenantId, generatePayloadAndSendToMobileArgs.UserId))
                {
                    using (var unitOfWork = _unitOfWorkManager.Begin())
                    {
                        Dictionary<RetailObjectId, ICRUDAppService> CRUDAppServices = new Dictionary<RetailObjectId, ICRUDAppService>();
                        List<PayloadData> PayloadsToSend = new List<PayloadData>();
                        Dictionary<long, string> PayloadsToSave = new Dictionary<long, string>();

                        var Payloads = (from Rep in _ReplicationTransactionMobileRepository.GetAll()
                                        select new
                                        {
                                            SequenceNo = Rep.Id,
                                            SourceType = (RetailObjectId)Rep.SourceType,
                                            SourceKey = Rep.SourceKey,
                                            OperationType = (OperationType)Rep.OperationType,
                                            Payload = Rep.Payload,

                                        }).ToList().Take(500);



                        foreach (var item in Payloads)
                        {
                            PayloadData PayloadToSend = new PayloadData()
                            {
                                SequenceNo = item.SequenceNo,
                                SourceType = item.SourceType,
                                SourceKey = item.SourceKey,
                                OperationType = item.OperationType,
                            };

                            if (!string.IsNullOrEmpty(item.Payload))
                                PayloadToSend.Payload = GetPayload(item.SourceType, item.Payload);
                            else
                            {
                                string PayloadToSave = GeneratePayload(item.SequenceNo, item.SourceType, item.SourceKey, CRUDAppServices);
                                PayloadToSend.Payload = GetPayload(item.SourceType, PayloadToSave);
                                PayloadsToSave.Add(item.SequenceNo, PayloadToSave);
                            }

                            PayloadsToSend.Add(PayloadToSend);
                            PayloadResult obj = new PayloadResult();
                            obj.result = PayloadsToSend;


                            List<ConnectedClient> connectedClients = AppStatic.ConnectedClients.Where(p => p.TenantId == generatePayloadAndSendToMobileArgs.TenantId).ToList();
                            if (connectedClients.Count() > 0 && PayloadsToSend.Count > 0)
                            {
                                JsonSerializerSettings jsonSerializerSettings = new JsonSerializerSettings();
                                jsonSerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver();
                                await _iVend365HubContext.Clients.All.SendAsync("GetDeltaQueue", JsonConvert.SerializeObject(obj, jsonSerializerSettings));

                            }
                        }

                        //Delete the Successfully send records
                        _iVendRepository.ExecuteQuery("Delete From RepReplicationTransactionMobileDetail Where ProcessStatus = 1");
                        _iVendRepository.ExecuteQuery("Delete From RepReplicationTransactionMobile Where SequenceNo Not In (Select RepReplicationTransactionMobileSequenceNo From RepReplicationTransactionMobileDetail)");

                        //Save the newely generated Payload in DB
                        foreach (KeyValuePair<long, string> PayloadToSave in PayloadsToSave)
                        {
                            ReplicationTransactionMobile replicationTransactionMobile = _ReplicationTransactionMobileRepository.Get(PayloadToSave.Key);
                            replicationTransactionMobile.Payload = PayloadToSave.Value;
                            _ReplicationTransactionMobileRepository.Update(replicationTransactionMobile);
                        }


                        unitOfWork.Complete();

                    }
                }
            }
            catch (Exception ex)
            {

            }

        }

In the above code, at following line, it throws the error, "There is already an open DataReader associated with this Command which must be closed first." Any idea, what could be wrong here?

var Payloads = (from Rep in _ReplicationTransactionMobileRepository.GetAll()
                                        select new
                                        {
                                            SequenceNo = Rep.Id,
                                            SourceType = (RetailObjectId)Rep.SourceType,
                                            SourceKey = Rep.SourceKey,
                                            OperationType = (OperationType)Rep.OperationType,
                                            Payload = Rep.Payload,

                                        }).ToList().Take(500);

Hi,

I am using ABP 3.6.2. Could you please advise me (or provide me link), how can I implement authentication? Please be aware, in my case the client here would be a third party application.

One way, in my mind is, let client call the Authenticate API of my application which will return him a token and then let the client connect to our signalr hub by passing that token. But I don't know how should I validate that token in my signalr Hub onConnected event?

Please help....

Regards, Mahendra

Question

Hi,

In ABP version 3.6.1, the following Javascript Client was working perfectly fine. But, since when we update the ABP to 3.6.2, it is not working.... In the following code, it throws the error: "signalr.min.js:15 Uncaught (in promise) WebSocket is not in the OPEN state"

Is there a new signalr.min.js file for ABP 3.6.2, If yes, please let me know the path from where I can download the same.

<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title></title> </head> <body>

&lt;script src=&quot;Scripts/jquery-1.6.4.js&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;Scripts/jquery.signalR-2.2.2.js&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;http://localhost:62114/lib/signalr-client/signalr.min.js&quot;&gt;&lt;/script&gt;
&lt;script&gt;
    
    var connection = new signalR.HubConnection('http://localhost:62114/signalr', { transport: signalR.TransportType.WebSockets });
    connection.start().then(function () {
        connection.send("RegisterPOS", 1018, "418307399342882834");
    });
   
&lt;/script&gt;

</body> </html>

Please advise... Regards, Mahendra

Question

Hi,

I was updating the ABP nuget to 3.6.2. While updating the ABP, I also updated the latest nuget of all associated nugets. All the projects apart from .Web.Host project all compiles successfully. But .Web.Host throws following compilation error...

The screen shot is also attached.

Severity Code Description Project File Line Suppression State Error NU1102 Unable to find package Microsoft.CSharp with version (>= 4.6.0-preview1-26525-01)

  • Found 34 version(s) in aspnetcore-dev [ Nearest version: 4.5.0-preview2-26308-02 ]
  • Found 22 version(s) in nuget.org [ Nearest version: 4.5.0-rc1 ]
  • Found 3 version(s) in Microsoft Visual Studio Offline Packages [ Nearest version: 4.3.0 ]
  • Found 0 version(s) in telerik.com CitiXsys.iVend365.Web.Host D:\CXS.Retail\Development\iVend365\src\CitiXsys.iVend365.Web.Host\CitiXsys.iVend365.Web.Host.csproj 1 Error NU1102 Unable to find package Microsoft.Extensions.DependencyModel with version (>= 2.2.0-preview1-26526-03)
  • Found 31 version(s) in aspnetcore-dev [ Nearest version: 2.1.0-preview2-26308-02 ]
  • Found 19 version(s) in nuget.org [ Nearest version: 2.1.0-rc1 ]
  • Found 7 version(s) in Microsoft Visual Studio Offline Packages [ Nearest version: 1.1.2 ]
  • Found 0 version(s) in telerik.com CitiXsys.iVend365.Web.Host D:\CXS.Retail\Development\iVend365\src\CitiXsys.iVend365.Web.Host\CitiXsys.iVend365.Web.Host.csproj 1 Error NU1102 Unable to find package Microsoft.Win32.Registry with version (>= 4.6.0-preview1-26525-01)
  • Found 40 version(s) in aspnetcore-dev [ Nearest version: 4.5.0-preview2-26308-02 ]
  • Found 21 version(s) in nuget.org [ Nearest version: 4.5.0-rc1 ]
  • Found 2 version(s) in Microsoft Visual Studio Offline Packages [ Nearest version: 4.3.0 ]
  • Found 0 version(s) in telerik.com CitiXsys.iVend365.Web.Host D:\CXS.Retail\Development\iVend365\src\CitiXsys.iVend365.Web.Host\CitiXsys.iVend365.Web.Host.csproj 1 Error NU1102 Unable to find package System.Buffers with version (>= 4.6.0-preview1-26525-01)
  • Found 34 version(s) in aspnetcore-dev [ Nearest version: 4.5.0-preview2-26308-02 ]
  • Found 11 version(s) in nuget.org [ Nearest version: 4.5.0-rc1 ]
  • Found 2 version(s) in Microsoft Visual Studio Offline Packages [ Nearest version: 4.3.0 ]
  • Found 0 version(s) in telerik.com CitiXsys.iVend365.Web.Host D:\CXS.Retail\Development\iVend365\src\CitiXsys.iVend365.Web.Host\CitiXsys.iVend365.Web.Host.csproj 1 Error NU1102 Unable to find package System.ComponentModel.Annotations with version (>= 4.6.0-preview1-26525-01)
  • Found 34 version(s) in aspnetcore-dev [ Nearest version: 4.5.0-preview2-26308-02 ]
  • Found 24 version(s) in nuget.org [ Nearest version: 4.5.0-rc1 ]
  • Found 3 version(s) in Microsoft Visual Studio Offline Packages [ Nearest version: 4.3.0 ]
  • Found 0 version(s) in telerik.com CitiXsys.iVend365.Web.Host D:\CXS.Retail\Development\iVend365\src\CitiXsys.iVend365.Web.Host\CitiXsys.iVend365.Web.Host.csproj 1 Error NU1102 Unable to find package System.Diagnostics.DiagnosticSource with version (>= 4.6.0-preview1-26525-01)
  • Found 41 version(s) in aspnetcore-dev [ Nearest version: 4.5.0-preview2-26308-02 ]
  • Found 15 version(s) in nuget.org [ Nearest version: 4.5.0-rc1 ]
  • Found 3 version(s) in Microsoft Visual Studio Offline Packages [ Nearest version: 4.3.1 ]
  • Found 0 version(s) in telerik.com CitiXsys.iVend365.Web.Host D:\CXS.Retail\Development\iVend365\src\CitiXsys.iVend365.Web.Host\CitiXsys.iVend365.Web.Host.csproj 1 Error NU1102 Unable to find package System.IO.Pipelines with version (>= 4.6.0-preview1-26525-01)
  • Found 32 version(s) in aspnetcore-dev [ Nearest version: 4.5.0-preview2-26308-02 ]
  • Found 5 version(s) in nuget.org [ Nearest version: 4.5.0-rc1 ]
  • Found 0 version(s) in Microsoft Visual Studio Offline Packages
  • Found 0 version(s) in telerik.com CitiXsys.iVend365.Web.Host D:\CXS.Retail\Development\iVend365\src\CitiXsys.iVend365.Web.Host\CitiXsys.iVend365.Web.Host.csproj 1 Error NU1102 Unable to find package System.Memory with version (>= 4.6.0-preview1-26525-01)
  • Found 38 version(s) in aspnetcore-dev [ Nearest version: 4.5.0-preview2-26308-02 ]
  • Found 5 version(s) in nuget.org [ Nearest version: 4.5.0-rc1 ]
  • Found 0 version(s) in Microsoft Visual Studio Offline Packages
  • Found 0 version(s) in telerik.com CitiXsys.iVend365.Web.Host D:\CXS.Retail\Development\iVend365\src\CitiXsys.iVend365.Web.Host\CitiXsys.iVend365.Web.Host.csproj 1 Error NU1102 Unable to find package System.Numerics.Vectors with version (>= 4.6.0-preview1-26525-01)
  • Found 40 version(s) in aspnetcore-dev [ Nearest version: 4.5.0-preview2-26308-02 ]
  • Found 19 version(s) in nuget.org [ Nearest version: 4.5.0-rc1 ]
  • Found 3 version(s) in Microsoft Visual Studio Offline Packages [ Nearest version: 4.3.0 ]
  • Found 0 version(s) in telerik.com CitiXsys.iVend365.Web.Host D:\CXS.Retail\Development\iVend365\src\CitiXsys.iVend365.Web.Host\CitiXsys.iVend365.Web.Host.csproj 1 Error NU1102 Unable to find package System.Reflection.Metadata with version (>= 1.7.0-preview1-26525-01)
  • Found 33 version(s) in nuget.org [ Nearest version: 1.6.0-rc1 ]
  • Found 31 version(s) in aspnetcore-dev [ Nearest version: 1.6.0-preview2-26308-02 ]
  • Found 4 version(s) in Microsoft Visual Studio Offline Packages [ Nearest version: 1.4.1 ]
  • Found 0 version(s) in telerik.com CitiXsys.iVend365.Web.Host D:\CXS.Retail\Development\iVend365\src\CitiXsys.iVend365.Web.Host\CitiXsys.iVend365.Web.Host.csproj 1 Error NU1102 Unable to find package System.Runtime.CompilerServices.Unsafe with version (>= 4.6.0-preview1-26525-01)
  • Found 40 version(s) in aspnetcore-dev [ Nearest version: 4.5.0-preview2-26308-02 ]
  • Found 10 version(s) in nuget.org [ Nearest version: 4.5.0-rc1 ]
  • Found 1 version(s) in Microsoft Visual Studio Offline Packages [ Nearest version: 4.3.0 ]
  • Found 0 version(s) in telerik.com CitiXsys.iVend365.Web.Host D:\CXS.Retail\Development\iVend365\src\CitiXsys.iVend365.Web.Host\CitiXsys.iVend365.Web.Host.csproj 1 Error NU1102 Unable to find package System.Security.Cryptography.Cng with version (>= 4.6.0-preview1-26525-01)
  • Found 34 version(s) in aspnetcore-dev [ Nearest version: 4.5.0-preview2-26308-02 ]
  • Found 12 version(s) in nuget.org [ Nearest version: 4.5.0-rc1 ]
  • Found 2 version(s) in Microsoft Visual Studio Offline Packages [ Nearest version: 4.3.0 ]
  • Found 0 version(s) in telerik.com CitiXsys.iVend365.Web.Host D:\CXS.Retail\Development\iVend365\src\CitiXsys.iVend365.Web.Host\CitiXsys.iVend365.Web.Host.csproj 1 Error NU1102 Unable to find package System.Security.Cryptography.Xml with version (>= 4.6.0-preview1-26525-01)
  • Found 29 version(s) in aspnetcore-dev [ Nearest version: 4.5.0-preview2-26308-02 ]
  • Found 9 version(s) in nuget.org [ Nearest version: 4.5.0-rc1 ]
  • Found 0 version(s) in Microsoft Visual Studio Offline Packages
  • Found 0 version(s) in telerik.com CitiXsys.iVend365.Web.Host D:\CXS.Retail\Development\iVend365\src\CitiXsys.iVend365.Web.Host\CitiXsys.iVend365.Web.Host.csproj 1 Error NU1102 Unable to find package System.Security.Principal.Windows with version (>= 4.6.0-preview1-26525-01)
  • Found 40 version(s) in aspnetcore-dev [ Nearest version: 4.5.0-preview2-26308-02 ]
  • Found 22 version(s) in nuget.org [ Nearest version: 4.5.0-rc1 ]
  • Found 2 version(s) in Microsoft Visual Studio Offline Packages [ Nearest version: 4.3.0 ]
  • Found 0 version(s) in telerik.com CitiXsys.iVend365.Web.Host D:\CXS.Retail\Development\iVend365\src\CitiXsys.iVend365.Web.Host\CitiXsys.iVend365.Web.Host.csproj 1 Error NU1102 Unable to find package System.Text.Encodings.Web with version (>= 4.6.0-preview1-26525-01)
  • Found 34 version(s) in aspnetcore-dev [ Nearest version: 4.5.0-preview2-26308-02 ]
  • Found 14 version(s) in nuget.org [ Nearest version: 4.5.0-rc1 ]
  • Found 4 version(s) in Microsoft Visual Studio Offline Packages [ Nearest version: 4.3.1 ]
  • Found 0 version(s) in telerik.com CitiXsys.iVend365.Web.Host D:\CXS.Retail\Development\iVend365\src\CitiXsys.iVend365.Web.Host\CitiXsys.iVend365.Web.Host.csproj 1 Error NU1102 Unable to find package System.Threading.Tasks.Extensions with version (>= 4.6.0-preview1-26525-01)
  • Found 30 version(s) in aspnetcore-dev [ Nearest version: 4.5.0-preview2-26308-02 ]
  • Found 10 version(s) in nuget.org [ Nearest version: 4.5.0-rc1 ]
  • Found 2 version(s) in Microsoft Visual Studio Offline Packages [ Nearest version: 4.3.0 ]
  • Found 0 version(s) in telerik.com CitiXsys.iVend365.Web.Host D:\CXS.Retail\Development\iVend365\src\CitiXsys.iVend365.Web.Host\CitiXsys.iVend365.Web.Host.csproj 1

Please advice...

Question

Hi,

My below client code (Console Application) successfully connects to the SignalR while server application runs locally.

             var hubConnection = new HubConnectionBuilder()
            .WithUrl("http://localhost:62114/signalr")
            .Build();

            hubConnection.On&lt;string&gt;("getMessage", message => Console.WriteLine(message));
            hubConnection.StartAsync().Wait();

            Console.WriteLine("Press Enter to Exit ...");
            Console.ReadLine();

But if I deploy my server application at azure then my following client (Console application) with the following code, throws "System.Net.WebSockets.WebSocketException. Unable to connect to the remote server" at the line "hubConnection.StartAsync().Wait();"

            var hubConnection = new HubConnectionBuilder()
            .WithUrl("http://ivend365retail-signalrtest.azurewebsites.net/signalr")
            .Build();

            hubConnection.On&lt;string&gt;("getMessage", message => Console.WriteLine(message));
            hubConnection.StartAsync().Wait();

            Console.WriteLine("Press Enter to Exit ...");
            Console.ReadLine();

Please advise how to fix this issue...

Regards, Mahendra

I have an application(Let's call it server application) that is built using ABP Framework and has the SignalR implemented. My Startup Class has the following code.

app.UseSignalR(routes => { routes.MapHub<iVend365Hub>("/signalr"); });

I have another WebApplication (Let's call it client application) that is built on normal ASP.Net Core framework and NOT the ABP framework.

Now when my client application needs to connect to my server application via signalR, what would the URL of src attribute of script tag that the client application should inject. I am talking about following script tag that the client application should inject

<script src="<WHAT SHOULD BE THE URL HERE>" type="text/javascript"></script>

I tried browsing the URL <a class="postlink" href="http://localhost:62114/signalr">http://localhost:62114/signalr</a> but it says "Connection ID required"......

Please help

Regards, Mahendra

Showing 1 to 10 of 44 entries