GFlisch / Arc4u.Guidance.Doc

Other
5 stars 1 forks source link

(2022.1.13) Incorrect image URL in Blazor application #203

Closed vvdb-architecture closed 5 months ago

vvdb-architecture commented 10 months ago

When generating a Blazor application, the file MainLayout.razor contains this:

            <NVBlock BackgroundColor="white"><NVImg Src="/assets/img/icon-512.png" Height="32" Width="32" /></NVBlock>

This works locally, since there is no path in the URL hosting the application (i.e. https://localhost:port).

However, when this application is deployed, there might be a path between the root URL and the application. The above code will ignore this, and the image icon-512.png will not be loaded:

Request URL:
https://azviewer-dev.tmd.belgrid.net/assets/img/icon-512.png
Request Method:
GET
Status Code:
404

The guidance should generate a relative URL (i.e. the first '/' should be deleted):

            <NVBlock BackgroundColor="white"><NVImg Src="assets/img/icon-512.png" Height="32" Width="32" /></NVBlock>
vvdb-architecture commented 7 months ago

Confirmed fixed in ACC