Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make ASP.Net (C#) Web App Available Offline

I have been tasked with making my company's Web App available offline. Before I move to the actual development phase, I want to be sure that my current strategy will not turn out to be a bust.

I first thought about using html5 app cache but after doing some tests I found that it seems to not cache the server side operations but the actual html that is rendered (Please correct me if I'm wrong). This will not work because the rendered html depends upon who is currently logged in. From my tests, it always rendered the html as if the last person that logged in (online) is logging in.

My current strategy is this: I cache only the login page and an offline (.html) page to correspond to each aspx page that will need to be available offline. Every successful login (online) results in creating or updating Web SQL Database or IndexDB (depending on browser) with all data needed for that person to operate offline including a table that will be used for login credentials. In this way the only requirement for logging in offline is logging in with your login credentials at least one time.

My concern is that I am overcomplicating it. In order to make this work, I will need to create an html page for each current page (a lot of pages) and I will have to rewrite everything that is currently being done on the server in JavaScript including validation, database calls, populating controls such as dropdown lists and data grids, etc. Also everything that I change in the future will require a subsequent offline change.

Is there an established best practice for what I am trying to do that I am overlooking or am I venturing into new ground?

like image 275
James Sumner Avatar asked Oct 10 '12 14:10

James Sumner


People also ask

Is ASP.NET a C?

ASP.NET is part of the . NET framework allowing you to write web applications using any CLS compliant language such as C#, VB.NET, F#, ... What you are referring to original asp language is called Classic ASP and it is not a language.

Can you make web apps with C#?

Interactive web UI with C#Blazor lets you build interactive web UIs using C# instead of JavaScript. Blazor apps are composed of reusable web UI components implemented using C#, HTML, and CSS. Both client and server code is written in C#, allowing you to share code and libraries.

Is ASP.NET written in C#?

When using ASP.NET your back-end code, such as business logic and data access, is written using C#, F#, or Visual Basic. Because ASP.NET extends .

Is ASP.NET still used?

As per a report by w3techs, ASP.NET is still used by 7.9% of all the websites whose server-side programming languages are known. However, it is not anywhere close to the usage statistics of PHP which amounts to 78% of all frameworks.


1 Answers

Please refer to these links, which gives you some insight on what is to be achieved. I'm not sure these are best practices, but these will be good starting point.

http://www.c-sharpcorner.com/UploadFile/aravindbenator/offline-mvc3-application/ http://www.developerfusion.com/article/84438/isolated-storage/

like image 179
Siva Karthikeyan Avatar answered Oct 29 '22 12:10

Siva Karthikeyan