Activities of "rwright-ruhealth"

Maliming;

Removing WEBDAV from the IIS server via remove roles/features solved the delete issue we were experiencing.

We still are encountering pathing issues with inbuilt pieces of ABP commercial. When trying to change the profile picture, the upload xmlhttprequest is trying to POST to the root of the site and it does not include the virtual application path. Is there a document published by ABP that covers proper configuration for applications served from virtual application directories, i.e. https://mysite.org/myapp

SEE this post as well: https://support.abp.io/QA/Questions/4800/User-Image-Lost (DOES NOT WORK FOR ME)

The path being posted to is: Volo.Abp.Account.Public.Web.Pages.Account.ManageModel.B8A9BBA0EEE4D03117FA135C1ED22DE0.js?_v=638161345940120111:5

   POST https://www.somesite.org/api/account/profile-picture 404  The POST request should be https://www.somesite.org/myapp/api/account/profile-picture  This works locally, but not on production server.
   

The error is: SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON at JSON.parse (<anonymous>) at Object.getResponseData (Volo.Abp.Account.Public.Web.Pages.Account.ManageModel.B8A9BBA0EEE4D03117FA135C1ED22DE0.js?_v=638161345940120111:5:696191) at XMLHttpRequest.<anonymous> (Volo.Abp.Account.Public.Web.Pages.Account.ManageModel.B8A9BBA0EEE4D03117FA135C1ED22DE0.js?_v=638161345940120111:5:699320)

Thank you.

Maliming,

I emailed you a link to server. Any word?

  • ABP Framework version: v7.0.1
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): NO ( MULTI PROJECT: YES)
  • Exception message and stack trace: NO Error; POPUP Alert: "An Error Has Occurred" "Error Detail Not Sent By Server" Error Log shows no error info, just a call to the api object [INF] Request finished HTTP/2 GET https://myserver.com/myapp/api/app/departments/7 - - - 200 - application/j which is a get for the record which exists. For what it's worth, health-status is throwing errors as well. Otherwise the app is working.
  • Steps to reproduce the issue:" I think this is a **BUG **in ABP.IO. It should not break the application to serve it from a virtual directory in IIS.
  • Create an ABP.IO App on local windows machine using ABP Suite.
  • Fix Up the paths in the index.js file so the app is properly served else the modals will not launch when app is published. just add the appPath + (and remove the leading / to the script createModal / editModal. Example:
  • var createModal = new abp.ModalManager({ viewUrl: abp.appPath + "Departments/CreateModal", scriptUrl: abp.appPath + "Pages/Departments/createModal.js", // here we have to remove the leading slash modalClass: "departmentCreate" });
  • Publish the App to An IIS Server WINDOWS 2019 where the app is served as a virtual application. example: https://myhost.com/myapp.
  • Create a record / Update the record. Should work. Delete the record. Error msg from above pops up.
  • a javascript debug of appPath should show "/myapp/" from the index.js in the pages directory.
  • The delete script is never called because the javascript myPageService.delete(data.record.mypage.id) is not called. I need to fix up the path on the delete so it hits the service, however, this delete is dynamically created api, not static api. On the localmachine with no virtual application, everything works as expected.

Implemented this routine in my AppNameWebModule.cs file as well, based on information from : https://support.abp.io/QA/Questions/181/Problem-with-IIS-application-path

Configure<AbpLayoutHookOptions>(options => { options.Add(LayoutHooks.Head.Last, typeof(AbpApplicationPathViewComponent)); });

  • ABP Framework version: v7.0.1

  • UI type: MVC

  • DB provider: EF Core

  • Tiered (MVC) or Identity Server Separated (Angular): no

  • Exception message and stack trace:

  • 2023-03-28 22:56:29.436 -04:00 [FTL] RicksAppDev terminated unexpectedly! Volo.Abp.AbpInitializationException: An error occurred during ConfigureServicesAsync phase of the module Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule, Volo.Abp.OpenIddict.AspNetCore, Version=7.1.0.0, Culture=neutral, PublicKeyToken=null. See the inner exception for details. ---> System.Security.Cryptography.CryptographicException: Access is denied. at System.Security.Cryptography.X509Certificates.StorePal.FromSystemStore(String storeName, StoreLocation storeLocation, OpenFlags openFlags) at System.Security.Cryptography.X509Certificates.X509Store.Open(OpenFlags flags) at Microsoft.Extensions.DependencyInjection.OpenIddictServerBuilder.AddDevelopmentEncryptionCertificate(X500DistinguishedName subject) at Microsoft.Extensions.DependencyInjection.OpenIddictServerBuilder.AddDevelopmentEncryptionCertificate() at Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule.<>c__DisplayClass1_0.<AddOpenIddictServer>b__0(OpenIddictServerBuilder builder) at Microsoft.Extensions.DependencyInjection.OpenIddictServerExtensions.AddServer(OpenIddictBuilder builder, Action1 configuration) at Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule.AddOpenIddictServer(IServiceCollection services) at Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule.ConfigureServices(ServiceConfigurationContext context) at Volo.Abp.Modularity.AbpModule.ConfigureServicesAsync(ServiceConfigurationContext context) at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync() --- End of inner exception stack trace --- at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync() at Volo.Abp.AbpApplicationFactory.CreateAsync[TStartupModule](IServiceCollection services, Action1 optionsAction) at Microsoft.Extensions.DependencyInjection.ServiceCollectionApplicationExtensions.AddApplicationAsync[TStartupModule](IServiceCollection services, Action1 optionsAction) at Microsoft.Extensions.DependencyInjection.WebApplicationBuilderExtensions.AddApplicationAsync[TStartupModule](WebApplicationBuilder builder, Action1 optionsAction) at RicksAppDev.Program.Main(String[] args) in D:\RicksAppDev\RicksAppDev\Program.cs:line 42

  • Steps to reproduce the issue:"

Create a simple single layer ABP app using ABP SUITE app. Then publish to a shared windows hosting server with sql server 2019 server and the above settings.

The exception logged by ABP is included above. NOTE: I published a multi project ABP App on a work server and had an "authserver.pfx" file with invalid password issue. I generated a self-signed authserver.pfx file with the password in the code and the app started working. There is no way to generate or find the password the OpenIddict server is looking for in this single layer app. How can I configure this single layer app to work.

Things I checked: Will shared hosting server work with .net core 7? Yes. I created a simple .net core 7 app with database access and was able to publish the app, load the pages, save data, etc. I created a version 6.2 ABP multi project app and was able to serve up the app from a Shared Hosting Server without issue. I did have other issues when schema is not "dbo" Something is very different between the two authentication schemes

Thank you.

Liangshiwei; Steps to reproduce:

Create a cities table in a sql server database: script below.

/****** Object:  Table [dbo].[Cities]    Script Date: 11/4/2022 8:21:55 AM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[Cities](
	[id] [uniqueidentifier] NOT NULL,
	[ci_city] [nvarchar](50) NULL,
	[ExtraProperties] [nvarchar](max) NULL,
	[ConcurrencyStamp] [nvarchar](40) NULL,
	[CreationTime] [datetime2](7) NOT NULL,
	[CreatorId] [uniqueidentifier] NULL,
	[LastModificationTime] [datetime2](7) NULL,
	[LastModifierId] [uniqueidentifier] NULL,
	[IsDeleted] [bit] NOT NULL,
	[DeleterId] [uniqueidentifier] NULL,
	[DeletionTime] [datetime2](7) NULL,
 CONSTRAINT [PK_Cities] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

ALTER TABLE [dbo].[Cities] ADD  CONSTRAINT [DF_Cities_uid]  DEFAULT (newsequentialid()) FOR [id]
GO

ALTER TABLE [dbo].[Cities] ADD  CONSTRAINT [DF__Cities__Creation__3DE82FB7]  DEFAULT (getdate()) FOR [CreationTime]
GO

ALTER TABLE [dbo].[Cities] ADD  CONSTRAINT [DF__Cities__IsDelete__3EDC53F0]  DEFAULT (CONVERT([bit],(0))) FOR [IsDeleted]
GO

Next, use abp-suite to load the entity from database and select only the ci_city property name. Uncheck all other fields. Choose primary key type of Guid. Set a menu icon of file-alt. Choose : Check the Create user interface; Create backend; Add migration; Uncheck Update database Check Create unit and integration tests. Rename the Name to City; Leave plural name as Cities, Database table/collection name is Cities Change namespace to CitiesNs Set Base Class to FullAuditedEntity and primary key to Guid. Save and Generate the entity. Examine the class generated by the Abp-suite generator in domain project. This is what I consistently get for all project entities created:

namespace ManytoMany.CitiesNs
{
    public class City : FullAuditedEntity<Guid>
    {
        [CanBeNull]
        public virtual string ci_city { get; set; }

        public City()
        {

        }

        public City(Guid id, string ci_city = null)
        {

            Id = id;
            Check.Length(ci_city, nameof(ci_city), CityConsts.ci_cityMaxLength, 0);
            ci_city = ci_city;
        }

    }

Notice there is no** this.ci_city** which causes the ci_city property to remain null when submitted to the database on the create method, because the class property is not assigned to. Instead the parameter property is being set to itself. When I correct the code to use:this.ci_city=ci_city, the data is properly saved on create. As you know, the this.ci_city refers to the class property and without the word this, it refers to the parameter. It is not an issue when the class property has a different case or name than the parameter, because there is no ambiguity. Also, my database fields are all lower case. The class produced by the abp suite is shown below.

namespace ManytoMany.CitiesNs
{
    public class City : FullAuditedEntity<Guid>
    {
        [CanBeNull]
        public virtual string ci_city { get; set; }

        public City()
        {

        }

        public City(Guid id, string ci_city = null)
        {

            Id = id;
            Check.Length(ci_city, nameof(ci_city), CityConsts.ci_cityMaxLength, 0);
            ci_city = ci_city;
        }

    }

Rick Wright Subject: [EXTERNAL] BUG: abp-suite 6.0.1 Entity generation (#3995) Answered by liangshiwei. — Hi, Could you provide the full steps to reproduce? we will check it out and yes we will refund your ticket if it's a problem.


You are receiving this because you are subscribed to this question. Do not reply to this email. Click here to view #3995 in browser.

recommendation: USE "this" with member variables with the same name to disambiguate between local variables and parameters and member variables that happen to have the same identifier name, which abp-suite generates automatically.

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

If you're creating a bug/problem report, please include followings:

  • ABP Framework version: v6.0.1
  • UI type: MVC in VS 2022 with SQL Server 2014
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace: 500 error
  • Steps to reproduce the issue:" create an entity using the ABP-SUITE 6.0.1 from an existing entity using load existing entity.
  • The "wizard" created class is almost correct, however the missing "this" reference for the left hand side of the expression in the class constructor results in a 500 error when viewing the Index page if the field is a required field, because null is not allowed. If null is allowed, you will get a new city record with no city. because the parameter and member variable have the same name from the
  • code generator.
  • Example Code generated by apb-suite before manual fixup: [ please do not count this legitimate bug report against my 30 allotment ]
public City(Guid id, string ci_city = null)
        {

            Id = id;
            Check.Length(ci_city, nameof(ci_city), CityConsts.ci_cityMaxLength, 0);
            ci_city = ci_city;  // THIS SHOULD BE this.ci_city=city;
        }
      
** working code  
// recommendation: USE "this" to disambiguate between local variables and parameters and member variables that happen to have the same identifier name
public City(Guid id, string ci_city = null)
        {

            Id = id;
            Check.Length(ci_city, nameof(ci_city), CityConsts.ci_cityMaxLength, 0);
            this.ci_city = ci_city;  // THIS SHOULD BE this.ci_city=city;
        }

**** recommendation: USE "this" to disambiguate between local variables and parameters and member variables that happen to have the same identifier name.****

Showing 71 to 77 of 77 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11