Page 1 of 1

Developer Tools' Sources

Posted: Wed Oct 23, 2019 9:32 pm
by KenX

First of all, I am a newbie in HTML/JavaScript/Browser stuffs, all I know is .NET. I have done some experiments using CSHTML5 and everything looks great locally.

I tried to publish the content of Output folder to a remote web server and take a look at how it performs in real life situation. However, the loading time before I can see anything takes up to 5 mins. I wonder if I have done something wrong in the code like an endless loop :o

In addition, when I turn on the web browser's Developer Tools, in the Sources tab, I can see all source code in its original form i.e. C# (attached). This is really holding me back on further development using CSHTML5 :shock:

Please advise :?

DeveloperToolsSources.png (109.46 KiB) Viewed 2584 times

Re: Developer Tools' Sources

Posted: Wed Oct 23, 2019 11:21 pm
by KenX
I tried to find the configurations and found "bridge.json" which seems to do the job by setting:

Code: Select all

   "outputFormatting": "Minified",
   "sourceMap": {
      "enabled": false

Is this the right way of doing it?

Moreover, if I have sensitive data e.g. password in the source code, what is the most secured way of storing it (cannot be looked up in the Output folder)? Thanks!

Re: Developer Tools' Sources

Posted: Sat Oct 26, 2019 12:42 am
by JS-Support @Userware
There must be an issue with the deployment. Could you please share the URL to te est your app? I will let you know if I see any issues with the deployment.

As for the question about the password, you shouldn't store the password in the client application. For example, if you need to connect to a database, you should put the connection string on the server side, and let the client connect to the server via web service calls.


Re: Developer Tools' Sources

Posted: Sun Oct 27, 2019 9:33 pm
by KenX
I think it was because the VM I used for hosting was too old and slow. Once I changed it to a newer one, the loading time greatly reduces to 5-6 secs which is acceptable :lol:

For storing of sensitive data, I didn't really mean to store real passwords or connection strings but some keywords to enable universal "secret" features (e.g. debug mode) or API key for multi-tenancy purposes. So, there is no way to store data somewhere without being exposed by browsing the source in the developer tools :?:

Also, if I really want to store user-specific passwords (remember me feature) or access tokens, can I store them safely in IsolatedStorageSettings :?: