Closed NathanVG closed 1 month ago
Hi @NathanVG,
What is the root URL you deployed your Blazing Story app to? Is it http://server/
, http://server/appname/
, or something similar? Generally, hosting a Blazor application under a sub-path URL requires some additional tasks to publish.
See also: https://learn.microsoft.com/aspnet/core/blazor/host-and-deploy/#app-base-path
Hi @NathanVG,
You may need to rewrite the href
attribute of the <base/>
tag in the iframe.html
. If your app is in the URL http://server/foo/bar
, you should rewrite it from /
to /foo/bar/
. Please keep in mind that a trailing slash is required.
<!-- wwwroot/iframe.html -->
<!DOCTYPE html>
<html lang="en">
<head>
...
<base href="/foo/bar/" /> <!-- 👈 rewrite this one! -->
...
Hi @jsakamoto,
this indeed fixed the issue, didn't consider the fact I'd have to do it for the iframe as well. Thank you!
I am trying to deploy our blazing story project internally, the publish works fine but all the components break due to not finding the imports in
iframe.html
i.e.<script src="_framework/blazor.webassembly.js"></script>
Shoud the paths be built differently?