2

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
A. Gh
  • 631
  • 9
  • 24
  • 1
    Could you please check your folder structure in `$web` container? – Jim Xu Aug 07 '20 at 08:26
  • @JimXu Yes, the folder structure is as follows: $web > WebAppProd > P****Frontend. – A. Gh Aug 11 '20 at 08:17
  • As far as I knew, we should host `index,html` under container `$web` root level. – Jim Xu Aug 11 '20 at 08:31
  • @JimXu Hmm, interesting. Because as far as I know, I have done this before (it is an automated release through **Azure Devops**), it'd worked. But I'm going to give it a try to host `index.html` under the `$web` root level. – A. Gh Aug 11 '20 at 08:34
  • @JimXu I have added the release YAML of the AzureFileCopy to the container. – A. Gh Aug 11 '20 at 08:48
  • @JimXu Fixed. See my new answer post. – A. Gh Aug 11 '20 at 08:57

1 Answers1

0

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.

A. Gh
  • 631
  • 9
  • 24