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

Technical Best Practices for Web Development on the CityU Web

by Helium Hung


Introduction 

The central web hosting service is set up to provide a consolidated, fully monitored and managed environment for hosting departmental and project websites for all departments and offices.
 
The hardware and software offered by the central web service are maintained and supported by the Computing Services Centre (CSC) while the web page contents and applications are developed and maintained by individual departments. Compatibilities with web standards and technical advices are provided by the CSC to departments to assist them in the development of new websites or the upgrade of existing websites.
 
Planning a website development
 
In order to provide a stable and safe web hosting environment for all web sites and services, users are expected to do all the development on their own machines and fully test them on the staging server before uploading to the central web hosting servers. Website administrators/developers are strongly advised to follow the development/staging/production life-cycle for website development (please refer to the article on “www6 Staging Server is Now available” in this issue of Network Computing).
 
The following steps will assist the website owners and web application developers to understand the central web hosting service provided by the CSC whereby facilitating smooth development and transition to production site.
 
1.       Web hosting on www6 server (www6.cityu.edu.hk) 
 
Platform
IIS 7.5 on Windows 2008 R2 Server
Database support
 
Microsoft SQL Server 2008 R2
User testing and training
 
wwwstaging.cityu.edu.hk
 
2.       Read the following documents.
 
Policy on Central Hosting
 
Frequently asked questions (FAQ)
 
 
3.       Submit an online CSC Work Request to create a web account and/or database account.
a.       Specify the required .NET Framework version (v2.0, v3.5, v4.0).
b.      Specify the database support if there is a need to store data for web forms.
 
4.       Develop the website/web application on a local workstation or server.
 
5.       Submit an online CSC Work Request to create a web account and/or database account on the staging server.
 
6.       Upload the revamped website to wwwstaging.cityu.edu.hk
a.       Make sure the web application is fully compatible with the web server and database server.
b.      Make sure the web application has NO high risk security vulnerabilities.
Please refer to the following links:
                                                   i.      Network computing 09/2009 issue
                                                 ii.      OWASP Top Ten Project
 
7.       Submit an online CSC Work Request to perform a web security scanning for any vulnerability.
a.       Usually, 90% of the vulnerabilities detected are:
                                                   i.      SQL Injection
                                                 ii.      Cross Site Scripting (XSS)
                                                iii.      Cross-Site Request Forgery (CSRF)
b.      Read the OWASP Top 10 Document for more details.
 
8.       Upload the ready-to-launch website to the www6 server.
 
According to the audit policy for central production server, any changes made to the web hosting and database servers must be recorded by CSC Work Request with justification, and approved by the CSC/Central IT. Situations where you may need to submit CSC Work Request are:
 
§  Create .Net framework application for sub-folders
§  Folder write permission for web application to generate data files
(To reduce the security risk, it is highly recommended to use a database for file storage)
§  SQL database backup, restore, quota change
§  Web account quota change
 
Best practices for building dynamic websites
 
The following tips are the best practices recommended for website owners or developers:
 
·         Do not keep backup files on the production site as disk space is limited.
 
·         Use a MS SQL user account with read-only permission whenever possible.
§         When you just need to display the database data without the need to update, you must use read-only permission in order to prevent the SQL injection attack.
 
·         Always use SSL (https connection) for logon pages
 
·         When coding logon pages, add codes (see sample coding below) to check whether https connection is in use. If non-secure connection (http) is used, redirect itself to the logon page with https protocol in order to make sure SSL is used.
Sample coding [Visual Basic]:
If not Request.IsSecureConnection Then
Response.Redirect("https://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("URL"))
End If
 
·         Carefully filter illegal input; allowing only a strict pattern of users' input.
For example:
1.       Validate the phone numbers by allowing digits and valid characters only.
2.       Validate the length of input by a certain value
(Note: Program generated hidden query variables are also needed to be validated.)
 
·         Add CAPTCHA to web forms to prevent DoS attacks.
§  You can use the free google captcha: http://www.google.com/recaptcha
§  Or, CSC provides BotDetect CAPTCHA for .Net 2.0, 3.5.  Submit an online CSC Work Request to obtain the BotDetect assembly file
 
·         Disable ASP.NET Application Level-Trace Log
To do this, locate the ‘trace enabled’ tag in your ‘web.config’ file and change the value to "false":
<configuration>
<system.web>
<trace enabled="false" />
</system.web>
</configuration>
 
·         Turn off detailed .NET error message
To do this, locate the ‘customErrors’ tag in your ‘web.config’ file and change the value to "On" or "RemoteOnly":
<configuration>
<system.web>
<customErrors mode="On" />
</system.web>
</configuration>
 
·         Use only Unicode code page for output in order to avoid ASP.NET or ASP Unicode Conversion Cross-Site Scripting.
To do this, add the following lines to your ‘web.config’ file:
<configuration>
<system.web>
<globalization responseEncoding="utf-8" />
</system.web>
</configuration>
 
·         Change the maximum request length if you need to upload large data file (> 4MB) in a web form.
To do this, add the following lines to your web.config file:
<configuration>
<system.web>
<httpRuntime maxRequestLength="10240" executionTimeout="3600"/>
</system.web>
</configuration>
 
·         Add NOINDEX meta tag to prevent dynamic pages from being crawled by search engines.
For Yahoo and Google, the tag should look like
<META NAME="robots" CONTENT="noindex">
 
For MSN, the tag should look like
<META NAME="*" CONTENT="noindex" />
 

 

百家乐必胜| 任你博| 玩百家乐游戏的最高技巧| 单机百家乐的玩法技巧和规则| 大发888 备用6222.co| 百家乐官网怎么打啊| 百家乐游戏程序下载| 九游棋牌大厅| 百家乐怎么压对子| 网络娱乐场| 百家乐电子路单谁| 百家乐官网赌场筹码| 棋牌小游戏| 太原百家乐官网的玩法技巧和规则| 百家乐二路珠无敌稳赢打法| 真人百家乐官网娱乐好玩| 噢门百家乐玩法| 马牌百家乐官网娱乐城| 新锦江百家乐官网娱乐网| 澳门赌场招聘| 手机百家乐的玩法技巧和规则| 百家乐官网投注翻倍方法| 威尼斯人娱乐场 赌场网址| 试玩百家乐官网1000| 百家乐官网路纸计算| 百家乐用什么平台| 百家乐官网三路法| 皇冠球网| 娱网棋牌下载| 百家乐下注所有组合| 百家乐官网剁手| 中国足球竞彩网| 威尼斯人娱乐城官方网| 豪华百家乐桌子| 百家乐官网园首选海立方| 澳门百家乐官网赢钱公式不倒翁 | 望江县| 丽都棋牌下载| 巴厘岛百家乐娱乐城| rmb百家乐官网的玩法技巧和规则 木星百家乐官网的玩法技巧和规则 | 百家乐论坛香港马会|