如何更新复制应用程序的应用程序状态 [英] How to update Application State for Replicated Application

查看:86
本文介绍了如何更新复制应用程序的应用程序状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我是在ASP.NET C#,SQL Server 2008 R2上的Web应用程序上开发的。为了获得更好的性能,我使用AppState存储管理查找数据。它在非复制中工作正常。

这里我使用



HttpContext.Current.Application [Table1]来存储数据App Level。

当管理员查找中出现任何问题时,我会在此应用程序状态中填写数据。



它有效。



现在我想将我的应用程序用于数据复制。

完成我在不同的SQL Server上有相同的单独数据库。



和不同的端口/应用服务器上的相同应用程序。



第一个应用程序是来自First SQL Server的用户优先数据库

第二个应用程序是来自第二个SQL Server的用户第二个数据库




现在当我从第一个应用程序URL更改管理数据时。我在第一个应用程序中获得了应用程序状态的最新数据。



但我的问题是如何在第二个应用程序中获得相同的数据。



我的数据库复制工作正常。



如何更新第二个应用程序的应用程序状态。



请指教。只是建议我可以使用哪种技术来完成。



谢谢

解决方案

我建​​议你使用一个基于SQL的会话状态处理,然后将其存储在那里,它直接工作,您可以存储任何可序列化的对象,这应该方便您的使用场景。

其他解决方案很可能会花费你更多的工作,这是我的直接猜测。

http://support.microsoft.com/kb/317604 [ ^ ]

Hello,

I have developed on web application in ASP.NET C#, SQL Server 2008 R2. In which for better performance i have used AppState for storing Admin Look Up Data. It works fine in Non Replicated.
Here i use

HttpContext.Current.Application["Table1"] to store data App Level.
And when any occur in Admin Look Up i re fill data in this Application State.

It works.

Now i want to use my application with Data Replication.
To accomplish i have same separate database on different SQL Server.

And same application on different Port/App Server.

First application is User First Database from First SQL Server
Second application is User Second Database from Second SQL Server


Now when i change admin data from first Application URL. i got latest data in application state in first Application.

But My question is how can i get same data in Second Application.

My Database replication is works fine.

How can i update application state of second application.

Please advice me. Just advice which technique i can use to accomplish.

Thanks

解决方案

I will recommend you to use an SQL based session state handling and then store it there, It works straight off the bat and you can store any serializable object that way which should facilitate your use scenario.
Other solutions are very likely to cost you more work would be my immediate guess.
http://support.microsoft.com/kb/317604[^]


这篇关于如何更新复制应用程序的应用程序状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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