Base solution for your next web application
Open Closed

Publish to Azure App Service - Angular Version #4481


User avatar
0
mmukkara created

Hi All, I am trying to publish Angular version (ASPNET ZERO v5.0.4) to Azure App Service. No issues related to Host project. When I published Angular project, I got an error related to woff2 Font Issue (Pic1). [attachment=1:34u85uch]Pic1.PNG[/attachment:34u85uch]

Read through this forum and updated web.config file with

<remove fileExtension=".woff" />
        <mimeMap fileExtension=".woff" mimeType="application/font-woff" />
        <remove fileExtension=".woff2" />
        <mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />

After uploading Web.config again, I get the same error but No error in chrome/edge console (Pic2)..I have no idea whats happening and where to look for logs as I don't see any log created in Azure App service and how to fix it. [attachment=0:34u85uch]Pic2.PNG[/attachment:34u85uch]

Your help is appreciated.

Thank you.

PS: Solution is straight download from ASPNETZERO. No modification done yet except database connection, azure app service urls in appsettings files and web.config files as mentioned above.


12 Answer(s)
  • User Avatar
    0
    aaron created
    Support Team

    Duplicate of #4361@aa0c462f-f0a7-42f5-9b22-a95cc6e6b3b3

    I have the same issue. You might notice that the min files in *.Web.Mvc\wwwroot\view-resources\Areas\App\Views_Bundles are not updated.

    I went to the command line and navigated to the root folder of the *.Web.Mvc project where the gulpfile.js is located, and I ran gulp --prod to minify the production files.

    Publish the project and the updated min files should be included.

  • User Avatar
    0
    mmukkara created

    Thanks for quick reply Aaron. But the post you referred too seems like on MVC not for Angular project. How do I run gulp on Angular project? There is not gulpjs file in dist folder of Angular.

    Can you please point me to the right direction.

    Thanks

  • User Avatar
    0
    aaron created
    Support Team

    Did you do ng build --prod?

  • User Avatar
    0
    mmukkara created

    Yes. I did ng build -prod and then copied to azure app service through FTP along with web.config file.

  • User Avatar
    0
    aaron created
    Support Team

    Can you show the error in Logs.txt?

  • User Avatar
    0
    mmukkara created

    This is where I am struggling. I don't see Logs.txt file in the wwwroot folder on azure for angular deployment. I mean seems like angular App is not creating it.

  • User Avatar
    0
    mmukkara created

    I think this may be the issue when I look at the logs... not sure System.ApplicationException: The trace listener AzureBlobTraceListener is disabled. ---> System.InvalidOperationException: The SAS URL for the cloud storage account is not specified. Use the environment variable 'DIAGNOSTICS_AZUREBLOBCONTAINERSASURL' to define it. at Microsoft.WindowsAzure.WebSites.Diagnostics.AzureBlobTraceListener.RefreshConfig() --- End of inner exception stack trace ---

  • User Avatar
    0
    aaron created
    Support Team
  • User Avatar
    0
    mmukkara created

    Thanks Aaron..I deleted and recreated everything again on Azure. I get the same issue even without diagnostic on azure. Here is the logs.txt file from App_Data folder on server side. I don't have any problem with server, but unable to run angular client. Same issue as below screen shot. [attachment=1:3q07bf2h]Pic2.PNG[/attachment:3q07bf2h]

    <a class="postlink" href="https://jasperweb.azurewebsites.net/">https://jasperweb.azurewebsites.net/</a> (This is Angular Client). If you need any credentials to look at the files or configuration, we can take a offline and I can share the any credentials required to solve this problem.

    Thank you. Logs.rar

  • User Avatar
    0
    mmukkara created

    I did everything I could...but unable to solve this problem. can you please check swagger is working fine at <a class="postlink" href="https://jasperapi.azurewebsites.net">https://jasperapi.azurewebsites.net</a> Angular Client App is at <a class="postlink" href="https://jasperweb.azurewebsites.net/">https://jasperweb.azurewebsites.net/</a> ...(Issue)

    if you need any credentials, I can email you at <a href="mailto:[email protected]">[email protected]</a>. I am stuck at this point.

    Anyone faced the same problem, please share your experiences and solutions. Thanks

  • User Avatar
    0
    mmukkara created

    Finally, I am able to deploy on Azure. Thank you for your help! I had to delete and recreate app services multiple times and finally it worked without any code changes.

  • User Avatar
    0
    aaron created
    Support Team

    Thanks for letting us know!