Developer Tools' Sources

KenX
Posts: 9
Joined: Sun Oct 13, 2019 9:19 pm

Developer Tools' Sources

Postby KenX » Wed Oct 23, 2019 9:32 pm

Hello,

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
DeveloperToolsSources.png (109.46 KiB) Viewed 9441 times

KenX
Posts: 9
Joined: Sun Oct 13, 2019 9:19 pm

Re: Developer Tools' Sources

Postby KenX » Wed Oct 23, 2019 11:21 pm

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!

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Re: Developer Tools' Sources

Postby JS-Support @Userware » Sat Oct 26, 2019 12:42 am

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.

Regards
JS-Support

KenX
Posts: 9
Joined: Sun Oct 13, 2019 9:19 pm

Re: Developer Tools' Sources

Postby KenX » Sun Oct 27, 2019 9:33 pm

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 :?:


Return to “General Discussion and Other”

Who is online

Users browsing this forum: No registered users and 29 guests

 

 

cron