angularazure-storageazure-blob-storageazure-static-website-hosting

"The requested content does not exist." 404 error with an Angular Static Website (Azure)


I have an Azure Storage Account where I've enabled Static Website. I have released and deployed my Angular website through the Azure Devops pipeline onto the storage account.

I have done this before, and the same error occurred. When adding the useHash code, the problem was solved:

@NgModule({
  imports: [RouterModule.forRoot(routes, { useHash: true })],
  exports: [RouterModule]
})

But this time the Not Found error still occurs.

error

I have used the URL provided by Azure itself (see below). Is there a solution to this?

url

EDIT:

This is the YAML for its release:

steps:
- task: AzureFileCopy@3
  displayName: 'AzureBlob File Copy'
  inputs:
    SourcePath: '$(System.DefaultWorkingDirectory)/WebAppTest'
    azureSubscription: 'some resource group'
    Destination: AzureBlob
    storage: testsomestorage
    ContainerName: '$web'
    sasTokenTimeOutInMinutes: 240

Solution

  • The fix for this issue was easy after trying several things. Below you see the folder structure of where the artifacts are stored in:

    Folder structure of linked artifacts

    I had selected the WebAppTest (Build) as the source path instead of the second one below called '****Frontend'.

    After I changed this, the website was finally working.