波音游戏源码-波音博彩公司评级_百家乐园天将_新全讯网3344111.c(中国)·官方网站

Tips on Developing Web Applications for Web Farms

by Wilson Wong

?

The CityU central web servers (www.22kk77.xyz and www6.cityu.edu.hk) are load-balanced web farms, which provide high availability services to the communities. In case any server instance of a web farm is unavailable (due to errors or maintenance), other server instances of the same web farm can still serve requests without service interruptions. 

Session Management
 
When a user visits our central web servers through a web browser, the central load-balancer (according to its internal algorithm) redirects the corresponding HTTP/HTTPS request to one of the server instances. For web applications that require continuous user interactions (for example, asking users to submit data via a web form), users may encounter broken sessions if related HTTP/HTTPS requests of a user session are redirected to other server instances. To  minimise issues of broken sessions, sticky persistent  has been enabled in the load-balancer which ensure all requests of the same user session are redirected to the same server instance. However, should the serving server becomes unavailable, the load-balancer will still redirect subsequent requests of the same user session to another server instance, hence users will still encounter issues of broken sessions.
 
To increase the persistency of .NET web applications, web developers are strongly recommended to make use of static machine keys for session state in web applications requiring user interactions. This would allow the session data of .NET web applications to be decrypted correctly among different server instances in the web farm. Therefore, even the serving server instance, A, becomes unavailable unexpectedly and the subsequent requests are redirected to another server instance, B, the server instance B could still decrypt the session data correctly with the static machine keys and avoid broken sessions.
 
To generate machine keys for your web application:
 
  • Locate and edit the web.config in the application root folder.
  • Add a <machineKey> section under <system.web>.
    <machineKey> section defines a pair of keys, validationKey and decryptionKey, which is used for encrypting, decrypting and validating session data. This pair of keys can be generated by the IIS Manager of your development PC as follows:
     
    • On your development PC, run the Internet Information Services Manager (inetMgr.exe)
    • Double-click “Machine Key” to open the Machine Key feature
      1. Select “AES” under “Decryption method:” and un-check “Automatically generate at runtime” and “Generate a unique key for each application” under “Validation key” and “Decryption key” respectively
      2. Click “Generate Keys” in the “Actions” panel on the right
      3. Copy  the generated “Validation key” and “Decryption key” into the  <machineKey> section under <system.web> in the web.config file as shown below:

                  (For security reasons, please generate different machine key pairs for different web applications.)

A Note for Using Classic ASP

Classic ASP stores session information in web servers, and therefore web applications developed by Classic ASP cannot share session information among server instances. If your web applications require storing data in a session, please consider building your web applications with ASP.NET instead.

 

References 

 

百家乐游戏| 娱乐论坛| 大发888婚庆车队| 三国百家乐娱乐城| 红宝石百家乐娱乐城| 百家乐变牌桌| 9人百家乐桌布| 大发888娱乐场游戏下载| 太子娱乐城官网| 财神百家乐官网的玩法技巧和规则 | 澳门葡京赌场出台女| 塑料百家乐官网筹码| 百家乐桌码合| 百家乐娱乐网真钱游戏| 实战百家乐的玩法技巧和规则 | 百家乐官网在线作弊| 喜德县| 宝马会娱乐城官网| 菲律宾太阳城88| 牌九娱乐城| 皇冠百家乐官网客户端皇冠| 宾利百家乐官网现金网| 百家乐官网桌布9人| 百家乐官网群的微博| 真人百家乐官网宣传| 百家乐官网娱乐送白菜| 百家乐的奥秘| 洛南县| 免费百家乐倍投软件| 棋牌游戏| 鲨鱼百家乐游戏平台| 大发888电话多少| 百家乐官网技巧心得| 足球百家乐网上投注| 金都娱乐| 德州扑克胜率| 屏山县| V博百家乐官网的玩法技巧和规则 中骏百家乐官网的玩法技巧和规则 | 百家乐必胜赌| 百家乐官网概率怎么算| 百家乐全讯网2|