Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "kpmg"

Answer

I am using the Zero 6.4.0 with Core 2.2 and Angular It's hosted as a App Service on Azure.

HTTP Error 500.0 - Internal Server Error - The page cannot be displayed because an internal server error has occurred.

Most likely causes:

  • IIS received the request; however, an internal error occurred during the processing of the request. The root cause of this error depends on which module handles the request and what was happening in the worker process when this error occurred.
  • IIS was not able to access the web.config file for the Web site or application. This can occur if the NTFS permissions are set incorrectly.
  • IIS was not able to process configuration for the Web site or application.
  • The authenticated user does not have permission to use this DLL.
  • The request is mapped to a managed handler but the .NET Extensibility Feature is not installed.

Detailed Error Information: Module: AspNetCoreModule Notification: ExecuteRequestHandler Handler: aspNetCore

Requested URL: https://mywebsite__fa76:80/TenantCustomization/GetCustomCss?id=67c9f746-0aa3-bcdc-241e-39eacd7efde6 Physical Path:D:\home\site\wwwroot\TenantCustomization\GetCustomCss Logon Method: Anonymous Logon User:Anonymous

The thing is, I am logged into the backend as administrator. I can't find the physical path on the FTP.

Question

Hi all!

I tried to upload a custom CSS and it looks like the file got uploaded. But during the GET process there is an error

GET https://MYWEBSITE//TenantCustomization/GetCustomCss?id=1e649217-0451-92d8-3d6c-39eacd5d30c9 net::ERR_ABORTED 500 (Internal Server Error)

Does anyone know why this error is shown?

Thanks in advance!

<input type="datetime" datePicker [(selectedDate)]="notificationDate" id="notificationDate" name="notificationDate" required>

The control is not validated even though it contains "required". Inside the directive ngModel is not updated Do we have to use a workaround with selectedDateChange and a dummy ngModel Binding?

If no tenant is selected, the tenant Id is null and the binary object is saved to the master database with tenant Id null. If a tenant is selected the correct tenant Id is set in the corresponding tenant database.

Actually it is not my code but in this case it should not be a problem to set the tenant Id multiple times even if is not necessary.

Good morning,

we use multi tenancy with a host database and separate databases for several tenants. We encountered an issue when loading from the tenant database.

Some more details:

When a file is saved as binary (it could be other data types as well) with selected tenant X it cannot be loaded again in production. If we select the host, save and reload the file it works but it doesn't work on a tenant database.

The upload method is located in the C# Project <ProjectName>.Web.Core in a controller that is derived from <ProjectName>ControllerBase that is derived from AbpController.

The download method is located in the same C# project in FileController also derived from <ProjectName>ControllerBase. The download method is

public async Task<FileResult> DownloadBinaryObject(Guid id, string displayName)
	    {
		    var binary = await _binaryObjectManager.GetOrNullAsync(id);
			var file = new FileContentResult(binary.Bytes, System.Net.Mime.MediaTypeNames.Application.Octet);
		    file.FileDownloadName = displayName;
		    return file;
	    }

The upload method:

        [HttpPost]
        [AbpMvcAuthorize]
        public async Task<JsonResult> UploadFile()
        {
            try
            {
                var file = Request.Form.Files.First();
                byte[] fileBytes;
                using (var stream = file.OpenReadStream())
                {
                    fileBytes = stream.GetAllBytes();
                }

                var fileObject = new BinaryObject(null, fileBytes);
                using (CurrentUnitOfWork.SetTenantId(AbpSession.TenantId))
                {
                    fileObject.TenantId = AbpSession.TenantId;
                    await BinaryObjectManager.SaveAsync(fileObject);
                }
                return Json(new AjaxResponse(new
                {
                    id = fileObject.Id,
                    name = file.FileName,
                    contentType = file.ContentType
                }));
            }
            catch (UserFriendlyException ex)
            {
                return Json(new AjaxResponse(new ErrorInfo(ex.Message)));
            }
        }

How can we resolve this issue?

Question

Hi everyone! I have the template version 6.2.0.0 and I just updated from a former version where there was the option to position the menu horizontally in the top region. Now I have to change the theme completly to achive this.

Is there another way to get to "standard theme" with a horizontal menu bar?

Thanks!

Hi all!

I have used the RAD tool for my application. Everything worked fine beside the datepicker. I can select a date and it got stored to the object and the database. If I edit the object I get the message "Invalid date".

Where does this come from and how can i solve this issue?

Thanks a lot!

Hi @ismcagdas!

Thanks for your answer. How does the UI look like if I do not select this option. Do I have then "embedded" editing screens when I selected an entry from the table?

Thanks!

Hi everyone!

I am playing arround with the RAD-Tool and I am wondering what the option "Create View Only Modal" does. I only found high level documentation about the tool but not what the features do in specific.

Can anyone help me with the option "Create View Only Modal"?

Thanks in advance!

I found an OK-solution for that.

I added all connection strings in the appsettings.json of the migrator project and adjusted the Main() function a little bit. So the user can choose between the different connection strings. it makes it much easier to update or create different environments.

Here is the code after the bootstrapper.Initialize();

using (var test = bootstrapper.IocManager.ResolveAsDisposable<TestMigratorModule>())
                using (var log = bootstrapper.IocManager.ResolveAsDisposable<Log>())
                {
                    var databases = test.Object.GetEnviroments();

                    string command = String.Empty;
                    while (!command.IsIn("E", "e"))
                    {
                        int i = 0;
                        Console.WriteLine("ID\t\tConnection Key");
                        foreach (var kv in databases)
                        {
                            Console.WriteLine(i + "\t\t" + kv.Key);
                            i++;
                        }

                        log.Object.Write("Type in the ID of the database you want to connect to OR e for Exit: ");
                        command = Console.ReadLine();
                        int result = -1;

                        if (int.TryParse(command, out result))
                        {
                            if (result >= databases.Count || result < 0)
                            {
                                log.Object.Write("The ID you entered does not exist. Try again.");
                            }
                            else
                            {
                                test.Object.SetEnvironment(databases[result].Key);

                                using (var migrateExecuter = bootstrapper.IocManager.ResolveAsDisposable<MultiTenantMigrateExecuter>())
                                {
                                    migrateExecuter.Object.Run(_skipConnVerification);
                                    log.Object.Write("Migration of "+ databases[result].Key+ " ended.");
                                }
                            }
                        }
                    }
                }

And then the new functions in the TestMigratorModule.cs look like this:

public List<KeyValuePair<string, string>> GetEnviroments()
        {
            string connectionStringSection = "ConnectionStrings";
            List<KeyValuePair<string, string>> ret = new List<KeyValuePair<string, string>>();
            foreach (var kv in _appConfiguration.GetSection(connectionStringSection).AsEnumerable())
            {
                string cleanKey = string.Empty;
                if (!string.IsNullOrEmpty(kv.Value))
                {
                    cleanKey = kv.Key.Substring(connectionStringSection.Length + 1);
                    ret.Add(new KeyValuePair<string, string>(cleanKey, kv.Value));
                }
            }
            return ret;
        }

        public void SetEnvironment(string environment)
        {
            Configuration.DefaultNameOrConnectionString = _appConfiguration.GetConnectionString(
                environment
                );
        }

Perhaps this helps someone.

Showing 21 to 30 of 43 entries