Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

ASP.NET Core demo1 Missing Style


The installation went as expected as per the guidance found at https://preview.keenthemes.com/asp.net-core/metronic/docs/getting-started. All operations completed. I used yarn install and gulp --demo1 from the _keenthemes/tools directory. However, when I run dotnet watch from the StarterKit directory, the resulting website has no style and all content is aligned left as plain html components. Am I missing something to put the stylesheets in the right place for the pages to access them? I don't see any stylesheets anywhere in the project.

Less concerning right now but also an issue, the server only serves the website at http://localhost:5042/ and not at the secure https://localhost:7094/ as the documentation suggests. The output shows a warning:
"warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3]
Failed to determine the https port for redirect."

I'm hoping someone can point out my error and provide guidance on how I can load the stylesheets into demo1 so I can get started.
Thank you!


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (7)


More details: It seems the problem is with gulp or the gulp.config. I can see that there are many stylesheets and js files defined in gulp.config and that they are supposed to be distributed to wwwroot/assets. However, after running gulp --demo1, my wwwroot/assets directory is unchanged. The output from gulp --demo1 follows:
❯ gulp --demo1
Using gulp config file: "../../gulp.config.js"
[08:09:27] Using gulpfile ~\source\repos\AdApp\StarterKit\_keenthemes\tools\gulpfile.js
[08:09:27] Starting 'default'...
[08:09:27] Starting 'cleanTask'...
[08:09:28] Finished 'cleanTask' after 891 ms
[08:09:28] Starting 'buildBundleTask'...
[08:09:28] Finished 'buildBundleTask' after 350 ms
[08:09:28] Finished 'default' after 1.25 s



Hi,

Thank you for reaching out to us.

Can you try to use the command gulp --metronic --demo1?

Regards,
Lauris Stepanovs,
Keenthemes Support Team



Hi,
I have same issue. Dont working (NotFound) styles (/css) and images (/media) in /assets folder with both demos (Demo1, Demo30).

Looks like gulp dont build it to project.

Any help for us?
Thanks.



HI,

Can you try to build assets with the command gulp --metronic --demo1?

Regards,
Lauris Stepanovs,
Keenthemes Support Team



Using gulp --metronic --demo1 resolved my style issue. The template now loads as advertised.

As for the https warning and subsequent connection refusal at https://localhost:7094, there are 2 issues here:
1. The https is actually configured in the template to use port 7077. This will work out-of-the-box using VS2022 to run the application.
2. Running with dotnet watch results in the middleware not being able to determine the https port for redirection. I resolved this by altering the template's launchSettings.json. Removing the profile.http object enabled dotnet watch to serve the website at port 7077.

Thank you for the quick response!



Hi,

Thank you for your feedback.

We will check it and include a fix in the next Metronic release.

Regards,
Lauris Stepanovs,
Keenthemes Support Team



Hi,

this works fine, thank you!!

Regards.
Michal


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(