ASP.NET防止SQL注入函数
ASP.NET防止SQL注入函数:
using System;
using System.Text.RegularExpressions;
using System.Web;
namespace FSqlKeyWord
......{
/**//**//**//// <summary>
/// SqlKey 的摘要说明。
/// </summary>
public class SqlKey
......{
private HttpRequest request;
private const string StrKeyWord = @"select|insert|delete|from|count(|drop table|update|truncate|asc(|mid(|char(|xp_cmdshell|exec master|netlocalgroup administrators|:|net user|""|or|and";
private const string StrRegex = @"[-|;|,|/|(|)|[|]|}|{|%|@|*|!|']";
public SqlKey(System.Web.HttpRequest _request)
......{
//
// TODO: 在此处添加构造函数逻辑
//
this.request = _request;
}
/**//**//**//// <summary>
/// 只读属性 SQL关键字
/// </summary>
public static string KeyWord
......{
get
......{
return StrKeyWord;
}
}
&nbs
相关文档:
在web config中 作如下配置:
<connectionStrings>
<add name="ydycon" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=|DataDirectory|ydy.mdb" providerName="System.Data.OleDb"/>
</connectionStrings>
在.net文件中应用链接 ......
查看回收站中表
select object_name,original_name,partition_name,type,ts_name,createtime,droptime from recyclebin;
恢复表
SQL>flashback table test_drop to before drop;或
SQL>flashback table "BIN$b+XkkO1RS5K10uKo9BfmuA==$0" to before drop;
......
提高数据库性能的方式有两种
一、一种是DBA通过对数据库的各个方面调优
调整数据库:共享池,java池,高速缓存,大型池,java池
针对于window操作系统 32位,oracle内存占用,最大为1.7G,超过则不作用,因此这几项值之和不应超过1.7G
目前各池参数为:
......
The Model-View-Controller (MVC) architectural pattern separates an application into three main components: the model, the view, and the controller. The ASP.NET MVC framework provides an alternative to the ASP.NET Web Forms pattern for creating MVC-based Web applications. The ASP.NET MVC framework is ......