Base solution for your next web application

Activities of "gep13"

Prerequisites

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

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

If issue related with ABP Framework

  • What is ABP Framework version?
    • N/A

If issue is about UI

  • Which theme are you using?
    • N/A
  • What are the theme settings?
    • N/A

Within the ASPNETZERO application, there are some built in feature flags that can be enabled/disabled, and we have also extended this to include some of our own feature flags for certain pieces of functioanlity.

At the minute, it is necessary to directly go into the database to toggle these features on/off.

Am I missing something, or is there a UI somewhere that can be shown to turn features on/off?

Thanks Gary

Prerequisites

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

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

If issue related with ABP Framework

  • What is ABP Framework version?
    • N/A

If issue is about UI

  • Which theme are you using?
    • N/A
  • What are the theme settings?
    • N/A

I have read the following article:

https://aspnetboilerplate.com/Pages/Documents/Plugin?searchKey=plugins

Which shows a very clean way of extending an application through the use of Plugins, however, the example seems to be limited to "backend" functionality, i.e. to provide the ability to do "work" on the application, in this case to provide a background worker to clear out the database.

Is it also possible to allow the extension of the UI for the application via a Plugin? If so, are there any examples of doing this?

We would like to be able to provide the core application to people, and then to allow the inclusion of a number of plugins. These plugins would contain additional UI (web pages) and application functionality.

Is this possilble?

If not possible out of the box, would there be any reason that we couldn't extend using something like ASP.NET Application Parts:

https://docs.microsoft.com/en-us/aspnet/core/mvc/advanced/app-parts?view=aspnetcore-5.0

Do you know of any examples of using an Application Part to extend an ASP.NET Zero project?

Thanks in advance! Gary

We have an odd situation, and I am not sure where to start with debugging this, so I am hoping that someone can shed some light on the problem.

We have released a version of the website, and installed it on a test machine, and everything is working as expected.

Since then, we have made some changes to the website, including adding some database tables, and changing schema etc.

If we run Migrator on the already installed instance, all the database changes are applied correctly.

However, if I run the same Migrator on a new instance of the website, not all migrations are applied. It seems to miss deploying the last 5 migrations.

Has anyone seen anything like this? There are no errors reported during the process of deploying the new database.

Thanks Gary

Hello,

I am hoping that someone can point me in the right direction regarding how timezones work in ASP.NET Zero. Firstly, let me explain what I have done...

I am using 6.2.1 of the template, and I have made the following modifications:

Added the following into my Startup.cs:

Clock.Provider = ClockProviders.Utc;

I have then changed the Date Time Format strings in the Users/index.js to the following:

 return moment(lastLoginTime).format('D MMM YYYY HH:mm:ss');

i.e. to include the Time portion.

So the first question, with the changes that I have made above, I would expect that all DateTimes stored in the database would be treated as UTC times, and as such, any display of these times, or export to Excel, to account for this. I can see this in action if I change the currently logged in user to another time zone (for example Greenland, which is three hours away from UTC)

In the above screenshot, everything works. The UTC date in the database is correctly displayed in the currently configured local timezone.

However, if I now do the following, things no longer do what I expect...

I change the creation date time to be on the 24th October 2018. On this day, Britain was in Daylight Savings mode, and as a result, we were 1 hour away from UTC. If at this point in time I created a user (which is what I am trying to simulate by making this change), the date stored in the database should have been offset by one hour. As a result, when I export/display the values, I would expect a 1 hour offset. This isn't happening, as you can see in this screenshot:

Are my expectations here invalid?

Assuming that all times are stored in UTC, and the site takes into account daylight savings, when exporting/displaying the Last Login DateTime, I would expect there to be a 1 hour offset. Can you please confirm if there is another setting that I need to enable to get the expected output?

Thanks

Gary

Are there any known issues with the abp-src taghelper? Or is there some settings that I have to enable to make it work.

When running the website out of Visual Studio, I have noticed that when the abp-src taghelper never switches to use the min.js version of a script. I have modified the launchSettings.json file to change the ASPNETCORE_ENVIRONMENT environment variable, and I have stepped through the code to see that it is "trying" to use the min.js version, however, what is rendered to the browser is the following:

<script abp-src="/view-resources/Views/Account/Login.js" src="/view-resources/Views/Account/Login.js"></script>

Here is a screenshot of the breakpoint which I set:

Is there something else that I need to enable this?

Once published to a production server, we are also not seeing the min.js links being rendered to the client. Can you confirm what needs to be enabled on the production server to back this work as well?

Thanks in advance for any help!

Hello,

We are seeing an issue with the default Excel Exporter, for example within the Audit Logs section of the site.

This was working properly, however, now that we have switched to handle multiple timezones, it is causing an exception. Here is what we did...

We added the following code to the Startup.cs class:

Clock.Provider = ClockProviders.Utc;

Now, when we navigate to the Audit Logs section of the site, and click Export to excel, we get "An internal error occurred during your request". Then, digging into the logs we see the following

ERROR 2018-10-19 11:30:38,069 [12 ] Mvc.ExceptionHandling.AbpExceptionFilter - The conversion could not be completed because the supplied DateTime did not have the Kind property set correctly. For example, when the Kind property is DateTimeKind.Local, the source time zone must be TimeZoneInfo.Local. Parameter name: sourceTimeZone System.ArgumentException: The conversion could not be completed because the supplied DateTime did not have the Kind property set correctly. For example, when the Kind property is DateTimeKind.Local, the source time zone must be TimeZoneInfo.Local. Parameter name: sourceTimeZone at System.TimeZoneInfo.ConvertTime(DateTime dateTime, TimeZoneInfo sourceTimeZone, TimeZoneInfo destinationTimeZone, TimeZoneInfoOptions flags, CachedData cachedData) at Abp.Timing.Timezone.TimezoneHelper.Convert(Nullable1 date, String fromTimeZoneId, String toTimeZoneId) at Abp.Timing.Timezone.TimeZoneConverter.Convert(Nullable1 date, Nullable1 tenantId, Int64 userId) at xxx.xxx.Auditing.Exporting.AuditLogListExcelExporter.<>c__DisplayClass3_0.<ExportToFile>b__1(AuditLogListDto _) at xxx.xxx.DataExporting.Excel.EpPlus.EpPlusExcelExporterBase.AddObjects[T](ExcelWorksheet sheet, Int32 startRowIndex, IList1 items, Func2[] propertySelectors) at xxx.xxx.Auditing.Exporting.AuditLogListExcelExporter.<>c__DisplayClass3_0.<ExportToFile>b__0(ExcelPackage excelPackage) at xxx.xxx.DataExporting.Excel.EpPlus.EpPlusExcelExporterBase.CreateExcelPackage(String fileName, Action1 creator) at xxx.xxx.Auditing.Exporting.AuditLogListExcelExporter.ExportToFile(List`1 auditLogListDtos) at xxx.xxx.Auditing.AuditLogAppService.d__6.MoveNext()

--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at lambda_method(Closure , Object ) at Microsoft.Extensions.Internal.ObjectMethodExecutorAwaitable.Awaiter.GetResult() at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__12.MoveNext()

--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__10.MoveNext()

--- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__14.MoveNext()

--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.d__23.MoveNext()

If I debug the Exporter when this is happening, I can see that the Kind of one of the dates is correctly (or at least I think it is correctly set) to Utc.

Undoing the code change that was made above, and debugging again when the Exporter is working, I can see that the Kind of one of the DateTime is set to Unspecified.

Can you please advice on how to correct this? Having enabled multiple timezones, are there additional code changes that need to be made? If so, where can I find documentation for this?

Thanks

Gary

Hello,

I have two questions that I am hoping to get some help on...

The first is with regard to the overall appSettings.json file. We would like to fully encrypt this file once it is deployed, and I am trying to figure out where I can put a custom ConfigurationSource in the application to allow this information to be decrypted, prior to handing it off to the rest of the application. Does anyone have an example of how to do this, or can provide some information about what needs to be done here? Is what I am suggesting considered a best practice, or should I be looking towards something else?

The other part of the question is related, as it also appears in the appSettings.json file, and that is the AbpZeroLicenseCode. Is this "ok" to leave in the appSettings.json file? Is it sensitive in anyway, i.e. would we not want other people to get access to this? What are the best practices around securing this information if required?

Thanks

Gary

Hello,

In the generated Index.js files for the entities I have created, I am seeing lines like this:

ajaxFunction: _computersService.getAll,

For querying all the records from the database. I have created a custom method in my controller that I want to call instead of the default getAll method, however, I am unable to find the _computersService defined anywhere to add that method to.

Can someone please point me in the right direction?

Thanks Gary

Hello,

I am trying to utilise the services, repositories, entity framework connection, that are used in the ASP.NET Zero Application, in another application. This is a Windows Service, and we want to use the same code to access the database that is used within the MVC application.

I have referenced all the necessary projects in my Windows Service, and I have been able to instantiate the service, and it successfully makes a call to the GetAll method. However, when it then tries to map the entity to the Dto, I get an error message:

Abp.ObjectMapping.IObjectMapper should be implemented in order to map objects

How can I go about passing the required mappings into the service layer for it to be used.

Thanks in advance.

Gary

Hello,

We have just downloaded the default ASP.NET Core + jQuery project of ASP.NET Zero, and we are running into issues running the .\build-mvc.ps1 and then the subsequent .\up.ps1 file.

The environment that I am running on is as follows:

dotnet --info

.NET Command Line Tools (2.1.4)

Product Information: Version: 2.1.4 Commit SHA-1 hash: 5e8add2190

Runtime Environment: OS Name: Windows OS Version: 10.0.16299 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\2.1.4\

Microsoft .NET Core Shared Framework Host

Version : 2.0.5 Build : 17373eb129b3b05aa18ece963f8795d65ef8ea54

docker --version

Docker version 17.12.0-ce, build c97c6d6

I can successfully run the .\build.ps1 file, and the Mvc and Public folder are created in the outputs folder, without any problems. However, when I run the .\up.ps1 file, I get the following:

Creating outputs_zero_mvc_1 ... done Creating outputs_zero_public_1 ... done

And then nothing.

If I run docker compose directly, rather than trying to run in the background, I get a little bit more information, which is:

Starting outputs_zero_public_1 ... Starting outputs_zero_public_1 ... done Attaching to outputs_zero_mvc_1, outputs_zero_public_1 zero_mvc_1 | Did you mean to run dotnet SDK commands? Please install dotnet SDK from: zero_mvc_1 | <a class="postlink" href="http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409">http://go.microsoft.com/fwlink/?LinkID= ... lcid=0x409</a> zero_public_1 | Did you mean to run dotnet SDK commands? Please install dotnet SDK from: zero_public_1 | <a class="postlink" href="http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409">http://go.microsoft.com/fwlink/?LinkID= ... lcid=0x409</a> outputs_zero_mvc_1 exited with code 145

Do you have any ideas about what is going on here? Is there anything that I need to change?

Thanks

Gary

Showing 1 to 10 of 10 entries