波音游戏-波音娱乐城赌球打不开

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游戏平台888| 卡迪拉娱乐城开户| 百家乐官网马宝| 顶级赌场官方直营网| 挖掘百家乐官网赢钱秘籍| 百家乐官网长t恤| 玩博论坛| 百家乐游戏软件开发| 百家乐官网网上技巧| 24山向名| 百家乐官网游戏机出千| 大发888老虎机网页版| 基础百家乐的玩法技巧和规则| OG百家乐官网大转轮| 葡京赌场| 百家乐补牌规律| 沙龙百家乐官网娱乐网| 大发888注册步骤| 百家乐评级导航| 博马百家乐官网娱乐城| 众发娱乐城| 百家乐翻天粤语版| 南郑县| 百家乐娱乐城体验金| 百家乐官网有看牌器吗| 战神娱乐| 大发888娱乐场下载dafaylcdown | 24山风水| 3U百家乐官网游戏| 百家乐平玩法几副牌| 百家乐开户就送现金| 百家乐官网证据| 百家乐官网隐者博客| 大发888娱乐注册| 威尼斯人娱乐城提款| 百家乐开户送10彩金| 缅甸百家乐官网龙虎斗| 香港六合彩的开奖结果| 大发888网页游戏平台|