如果网络中断,则将数据保存到本地计算机 [英] save data to local machine if the internet down

查看:117
本文介绍了如果网络中断,则将数据保存到本地计算机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好
我有一个Web应用程序已上传到互联网上
如果互联网中断,我需要将客户端计算机中的数据存储在本地,如果互联网返回,则需要重新发送数据
您对我的建议是什么,以及我做这件事的习惯
帮我plese

Hi All
I have a web application uploaded to the internet
i need to store data from client machine in the local if the internet down and re send it if the internet back
what your advice to me and what i use to doing this thing
Help me plese

推荐答案


您可以检查互联网连接是否正常,然后决定是将数据保存到服务器还是客户端.然后,您可以在适当的时间将客户日期传输到服务器.为了将数据保存在客户端计算机上,您可以使用HTML5,sessionStorage或其他方法(如果要存储的数据规模无法保存在cookie中).

看看这些帖子:

如何确定互联网连接是否正常:
http://stackoverflow.com/questions/9017891/net-webexception-to-check-if-local-machine-has-internet-access [ HTML5 Web存储在本质中 [
Hi,
You can check the internet connection if it is OK, then decide to whether to save data to server or on the client. Then, in a proper time you can transfer client date to server. In order to save data on client machine you may use HTML5, sessionStorage or something else if the scale of data to be stored can not be saved in cookies.

Take a look at these posts:

How to realize if the internet connection is OK:
http://stackoverflow.com/questions/9017891/net-webexception-to-check-if-local-machine-has-internet-access[^]

HTML5 and webStorage:
HTML5 Web Storage in Essence[^]

Hope it will help,
Cheers


非常感谢您回答
检查互联网连接的方式很棒
但是我对HTML5有问题,因为我使用ASP.Net C#和Sql Server数据库
和要存储的数据量就像数据库中的表
您是否还有另一种方法将数据存储在客户端计算机中并在Internet连接恢复后重新发送?
问候
thank you very much to answer
The way to check to internet connection is wonderful
but i have a problem with HTML5 because i use ASP.Net C# and Sql Server Database
and the amount to data to store is like table in database
do you have another way to store the data in the client machine and re send it after the internet connection back?
Regard


这篇关于如果网络中断,则将数据保存到本地计算机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆