question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Icons don't display on Azure

See original GitHub issue

🐛 Bug Report

FluentIcons don’t display on Blazor server app deployed to azure unless public access enabled

💻 Repro or Code Sample

Deploy a default template blazor app with a fluent icon somewhere on the index page and deploy to azure. It will appear. Now restrict inbound traffic to just your IP address. Open up a new browser and check the address ,- the icon will have disapeared

🤔 Expected Behavior

The icons display locally, but unfortunately after deploying to Azure they no longer display unless all inbound traffic is set to allowed, I’d expect them to display regardless as they are being accessed from the _content folder?

😯 Current Behavior

I am developing a Blazor Server app that is deployed on Azure uses Microsoft.Fast.Components.FluentUI for icons. They work fine locally but after deploying to azure, the icons don’t display and also cause errors of the type

````Error: System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.``` (see fig3 for full stack trace) Strangely, if I change the inbound traffic access to public, [Networking-> inbound access ->Access restriction -> public], then these errors go away and the icons display (see fig 1) but this obviously isn’t a solution.

I set up live logging on app insights and weirdly the icons are returning 403s when the app service tries to access them - then the error above happens. I can access this url/display the image in the browser so strange the app service doesn’t authorize this. (see fig2) These icons are in the content folder so it’s strange they’re unauthorised. My question for you all; Has anyone an idea of what could be getting blocked and causing the icons not to show as it looks like that something that is blocked when we are using the private endpoint is causing the 403s and I’d like to figure out what.

I’d sincerely appreciate any help anyone could provide on this matter

Fig 1 open up inbound traffic to public

image

Fig 2 – 403 errors from application insights

image

Outgoing command
GET /_content/Microsoft.Fast.Components.FluentUI/icons/Phone/48_r.svg
Result code: 403
AspNetCoreEnvironment: Production
_MS.ProcessedByMetricExtractors:(Name:'Dependencies', Ver:'1.1')
url:https:/mysitehere.azurewebsites.net/_content/Microsoft.Fast.Components.FluentUI/icons/Phone/48_r.svg

Fig 3 Complete Error

``blazor.server.js:1 [2023-08-01T15:34:41.396Z] Error: System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
---> System.IO.IOException:  Received an unexpected EOF or 0 bytes from the transport stream.
   at System.Net.Security.SslStream.ReceiveBlobAsync[TIOAdapter](CancellationToken cancellationToken)
   at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](Boolean receiveFirst, Byte[] reAuthenticationData, CancellationToken cancellationToken)
   at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem)
   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.HttpConnectionWaiter`1.WaitForConnectionAsync(Boolean async, CancellationToken requestCancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.<SendAsync>g__Core|5_0(HttpRequestMessage request, CancellationToken cancellationToken)
   at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.<SendAsync>g__Core|5_0(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at Microsoft.Fast.Components.FluentUI.HttpBasedStaticAssetService.GetAsync(String assetUrl, Boolean useCache) in /_/src/Microsoft.Fast.Components.FluentUI/Infrastructure/HttpBasedStaticAssetService.cs:line 50
   at Microsoft.Fast.Components.FluentUI.FluentIcon.GetIconContentAsync() in /_/src/Microsoft.Fast.Components.FluentUI/Components/Icon/FluentIcon.cs:line 226
   at Microsoft.Fast.Components.FluentUI.FluentIcon.OnAfterRenderAsync(Boolean firstRender) in /_/src/Microsoft.Fast.Components.FluentUI/Components/Icon/FluentIcon.cs:line 162
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)

💁 Possible Solution

Perhaps if I could find out what is being blocked I could allow it?

🔦 Context

🌍 Your Environment

  • OS & Device: windows 10
  • Browser [Google Chrome, edge]
  • Blazor server Microsoft.Fast.Components.FluentUI 2.4.1

Issue Analytics

  • State:closed
  • Created 2 months ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
vincemcc79commented, Aug 8, 2023

Thank you Denis,

I actually deleted the question just after I posted it as it didn’t feel like to correct place to post this. Thanks very much for the response, that makes perfect sense.

0reactions
vnbaaijcommented, Aug 10, 2023

Your site’s base url

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fontello icons not showing in Azure web application
Running application locally, the icons look fine but when run in Azure they do not show. As recommended in: http://codingstill.com/2013/01/set- ...
Read more >
Graphic icons missing on webpages - Browsers
When you load web applications that use font icons, you notice that the icons are not displayed correctly in Internet Explorer.
Read more >
Some Fabric Icon not displaying in new Azure-Devops-UI
I need to show some fabric icon which is given in https://uifabricicons.azurewebsites.net/. But some icons are not displaying.
Read more >
Thumbnail icon of apps not showing in windows 10 Start ...
Restart your computer and check the icons. If issue persists, rebuild the icon cache. -Click Start, type CMD and run as administrator -Copy...
Read more >
Missing icons/images after deploying XAF Web application ...
I just deployed my demo xaf web application in Windows Azure. I noticed that some button icons do not display correctly (they show...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found