locked
the weather sample app - what happens to the weather.json file? RRS feed

  • Question

  • User379720387 posted

    Just getting my feet wet with Blazor, playing with the weather sample app.

    This file holds the temperature data to illustrate the functonality of this app.

    Wondering what happens with this file when the project is running in the browser. Is it now compiled to Web Assembly instructions intermingled with the assembly code for the rest of the project.

    If so, is this web assembly one-way? I.e. can someone take it and reverse engineer it?

    Friday, May 1, 2020 6:42 PM

Answers

  • User753101303 posted

    Hi,

    No. The C# client side code fetch this file from the web server (it is in wwwroot ie published as a static file). This is just a simple way to mock an actual weather service.

    As anything a computer can run it could be potentially reversed engineered so it's likely still best to avoid sending anything sensitive to rhe client side

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, May 12, 2020 8:22 PM

All replies

  • User107810802 posted
    Can you please explain what you are trying to do for better understanding
    Monday, May 11, 2020 10:42 PM
  • User753101303 posted

    Hi,

    No. The C# client side code fetch this file from the web server (it is in wwwroot ie published as a static file). This is just a simple way to mock an actual weather service.

    As anything a computer can run it could be potentially reversed engineered so it's likely still best to avoid sending anything sensitive to rhe client side

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, May 12, 2020 8:22 PM
  • User379720387 posted

    Finally got my blazor app running again and yes indeed that json file is send to the browser and can be seen with the developer tools from the browser.

    Was hoping that it would be part of an assembled piece of data.

    Are there other means to send data to the client hidden from view? It is a small amount of data say 50 rows and 6 columns.

    Wednesday, May 13, 2020 1:05 PM
  • User753101303 posted

    It needs to come from the server or it could be embedded as declaration or a resource (maybe encrypted) ? Never tried that yet. Or it ends uip being send again to the server.

    It could be easier to help if knowing exactly what it is.

    Wednesday, May 13, 2020 1:20 PM
  • User379720387 posted

    This will run locally.

    Ideally I would build the client side blazor app, end up with a folder with some files that I can send to or run from browser.

    Developer tools shows nothing of interest.

    Wednesday, May 13, 2020 1:29 PM