Base solution for your next web application

Activities of "ryan.mennell"

I'm using ASP.NET Core MVC & jQuery Project

Below code works correctly, but i always need to use TimezoneHelper.ConvertFromUtc to convert utc date time from server to Client's set Timezone Date time. If i not convert it then it always shows utc date time as it is from server into datetimepicker.

Is There anything that datetimepicker convert this automatically and display client timezone's datetime without converting it in cshtml views?

I have set ClockProviders.Utc in Configure method of startup.cs file as below:

//Initializes ABP framework.
app.UseAbp(options =>
{
options.UseAbpRequestLocalization = false; //used below: UseAbpRequestLocalization
Clock.Provider = ClockProviders.Utc; // Add the clock setting
});

App/Views/SalesEnquiry/ManageSalesEnquiry.cshtml file

@{
var currentTimezone = await SettingManager.GetSettingValueAsync(TimingSettingNames.TimeZone);
Model.SalesEnquiry.EnquiryDate = TimezoneHelper.ConvertFromUtc(Model.SalesEnquiry.EnquiryDate, currentTimezone).Value;
}
<label>@L("EnquiryDate")</label>@Html.TextBox("EnquiryDate", Model.SalesEnquiry.EnquiryDate, new { @class = "form-control m-input", required = "required", autocomplete = "off" })<span class="input-group-text"><span class="far fa-calendar-alt"></span></span><br>

/ManageSalesEnquiry.js file

$('#EnquiryDate').datetimepicker({
locale: abp.localization.currentLanguage.name,
format: 'L LT'
});

Thanks for the quick response. Apologies for the delay with mine.

Yes it is hitting and value of abp.timing.timeZoneInfo.iana.timeZoneId is "Europe/London"

Host timezone i set is Default [UTC]. Tenant timezone i set is GMT Standard Time.

Enquiry Date value in tenant database is 2020-05-25 08:00:00.0000000. which will be considered as UTC as i set ClockProviders.UTC.

However, On tenant login > enquiry page > DateTimePicker field > i get same date time "25/05/2020 08:00" if i do not convert it manually with "TimezoneHelper.ConvertFromUtc".

Just bumping this fo visibility.

Apologies for bumping this again, I can clearly see there is high number of support tickets.

I have sent the project via email. Could you get back to me asap.

Thanks Ryan

Hello,

I have recently purchased this and unable to fix this issue on my own.

I have sent the project via email with zero response (9 Days ago).

Could you please get back to me ASAP.

Kind Regards Ryan

Could you please update me on this issue? I have also sent emails with zero answers.

@derirmusa

Thank you, I will test this and let you know if I have any issues.

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

Issue

In our project, we need filter dropdown values and MapBoxMapLoadLimitPerTenant to validate a map load. currently i'm getting this data by calling:

$.getJSON('/App/Jobs/GetJobsWidgetModelData'

Later in the widget JS file I'm calling:

_commonService.updateAndGetMapBoxLoadCount

which actually uses value of MapBoxMapLoadLimitPerTenant and shows a custom error. However, there is inconsistency with which API call will finish first.

in short, I want initialized data from razor view to widget's js(customisable dashboard) file. Could you help me find a solution?

Thanks Ryan

  • What is your product version? aspnetzero v11 jQuery
  • What is your product type (Angular or MVC)? MVC
  • What is product framework type (.net framework or .net core)? .net core
  • What is ABP Framework version? ABP framework v7.0.1

We've had a azure pipeline that has been working and after upgrading to the latest version of ABP, it is currently failing on the publish command. dotnet restore and build work fine as they did previously. It is hosted on image: ubuntu-20.04

Error if I specifically target the project in the build task:

MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.
##[error]Error: The process '/opt/hostedtoolcache/dotnet/dotnet' failed with exit code 1
/opt/hostedtoolcache/dotnet/dotnet publish /home/vsts/work/1/s/src/MBT.Web.Mvc/MBT.Web.Mvc.csproj --configuration Release --output /home/vsts/work/1/a/MBT.Web.Mvc
Microsoft (R) Build Engine version 17.1.0+ae57d105c for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
  Restored /home/vsts/work/1/s/src/MBT.GraphQL/MBT.GraphQL.csproj (in 3.36 sec).
  Restored /home/vsts/work/1/s/src/MBT.Web.Core/MBT.Web.Core.csproj (in 3.4 sec).
  Restored /home/vsts/work/1/s/src/MBT.EntityFrameworkCore/MBT.EntityFrameworkCore.csproj (in 575 ms).
  Restored /home/vsts/work/1/s/src/MBT.Core/MBT.Core.csproj (in 490 ms).
  Restored /home/vsts/work/1/s/src/MBT.Core.Shared/MBT.Core.Shared.csproj (in 188 ms).
  Restored /home/vsts/work/1/s/src/MBT.Application/MBT.Application.csproj (in 596 ms).
  Restored /home/vsts/work/1/s/src/MBT.Application.Shared/MBT.Application.Shared.csproj (in 130 ms).
/home/vsts/work/1/s/src/MBT.Web.Mvc/MBT.Web.Mvc.csproj : error NU1605: Detected package downgrade: System.Net.NameResolution from 4.3.0 to 4.0.0. Reference the package directly from the project to select a different version. 
/home/vsts/work/1/s/src/MBT.Web.Mvc/MBT.Web.Mvc.csproj : error NU1605:  MBT.Web.Mvc -> MBT.Web.Core -> MBT.Application -> SSH.NET 2016.1.0 -> System.Net.Sockets 4.1.0 -> runtime.unix.System.Net.Sockets 4.3.0 -> System.Net.NameResolution (>= 4.3.0) 
/home/vsts/work/1/s/src/MBT.Web.Mvc/MBT.Web.Mvc.csproj : error NU1605:  MBT.Web.Mvc -> MBT.Web.Core -> MBT.Application -> SSH.NET 2016.1.0 -> System.Net.NameResolution (>= 4.0.0)
  Failed to restore /home/vsts/work/1/s/src/MBT.Web.Mvc/MBT.Web.Mvc.csproj (in 4 sec).
##[error]Error: The process '/opt/hostedtoolcache/dotnet/dotnet' failed with exit code 1
##[warning].NET 5 has some compatibility issues with older Nuget versions(<=5.7), so if you are using an older Nuget version(and not dotnet cli) to restore, then the dotnet cli commands (e.g. dotnet build) which rely on such restored packages might fail. To mitigate such error, you can either: (1) - Use dotnet cli to restore, (2) - Use Nuget version 5.8 to restore, (3) - Use global.json using an older sdk version(<=3) to build
Info: Azure Pipelines hosted agents have been updated and now contain .Net 5.x SDK/Runtime along with the older .Net Core version which are currently lts. Unless you have locked down a SDK version for your project(s), 5.x SDK might be picked up which might have breaking behavior as compared to previous versions. You can learn more about the breaking changes here: https://docs.microsoft.com/en-us/dotnet/core/tools/ and https://docs.microsoft.com/en-us/dotnet/core/compatibility/ . To learn about more such changes and troubleshoot, refer here: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/build/dotnet-core-cli?view=azure-devops#troubleshooting
##[error]Dotnet command failed with non-zero exit code on the following projects : /home/vsts/work/1/s/**/MBT.Web.Mvc.csproj,/home/vsts/work/1/s/src/MBT.Web.Mvc/MBT.Web.Mvc.csproj
Finishing: Publish

Error if I use previous config:

  MBT.Web.Mvc -> /home/vsts/work/1/a/MBT.Web.Mvc/
##[warning].NET 5 has some compatibility issues with older Nuget versions(<=5.7), so if you are using an older Nuget version(and not dotnet cli) to restore, then the dotnet cli commands (e.g. dotnet build) which rely on such restored packages might fail. To mitigate such error, you can either: (1) - Use dotnet cli to restore, (2) - Use Nuget version 5.8 to restore, (3) - Use global.json using an older sdk version(<=3) to build
Info: Azure Pipelines hosted agents have been updated and now contain .Net 5.x SDK/Runtime along with the older .Net Core version which are currently lts. Unless you have locked down a SDK version for your project(s), 5.x SDK might be picked up which might have breaking behavior as compared to previous versions. You can learn more about the breaking changes here: https://docs.microsoft.com/en-us/dotnet/core/tools/ and https://docs.microsoft.com/en-us/dotnet/core/compatibility/ . To learn about more such changes and troubleshoot, refer here: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/build/dotnet-core-cli?view=azure-devops#troubleshooting
##[error]Dotnet command failed with non-zero exit code on the following projects : /home/vsts/work/1/s/**/MBT.Web.Mvc.csproj
Finishing: Publish

Let me know if you have any questions

Showing 1 to 10 of 13 entries