易截截图软件、单文件、免安装、纯绿色、仅160KB

c# asp.net 字符串加密解密的类


using System;   
using System.Collections.Generic;   
using System.Text;   
using System.Security.Cryptography;//Cryptography密码术   
namespace DAL   
{   
    public class Encry   
    {   
        public Encry() { }  
 
        #region AES加密   
  
        public static string Encrypt(string toEncrypt)   
        {   
            byte[] keyArray = UTF8Encoding.UTF8.GetBytes("12345678901234567890123456789012");   
            byte[] toEncryptArray = UTF8Encoding.UTF8.GetBytes(toEncrypt);   
  
            RijndaelManaged rDel = new RijndaelManaged();//using System.Security.Cryptography;   
            rDel.Key = keyArray;   
            rDel.Mode = CipherMode.ECB;//using System.Security.Cryptography;   
            rDel.Padding = PaddingMode.PKCS7;//using System.Security.Cryptography;   
  
            ICryptoTransform cTransform = rDel.CreateEncryptor();//using System.Security.Cryptography;   
     &nbs


相关文档:

ASP.NET 未被授权访问所请求的资源

ASP.NET 未被授权访问所请求的资源。请考虑授予 ASP.NET 请求标识访问此资源的权限。ASP.NET 有一个在应用程序没有模拟时使用的基进程标识(通常,在 IIS 5 上为 {MACHINE}\ASPNET,在 IIS 6 上为网络服务)。如果应用程序正在通过 模拟,则标识将为匿名用户(通常为 IUSR_MACHINENAME)或经过身份验证的请求用户。
若要授予 ......

Asp.Net Forms验证文章中最后的web.config文件

<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
  <system.web>
        <authorization>
            < ......

ASP.NET中连接数据库的各种方法


今天,学习了ASP.NET中连接数据库的各种方法,这是我自己的一个小总结,不一定完全正确,仅供参考!   O(∩_∩)O~
 
 
连接SQL数据库的方法:
(一)、在Web.Config中创建连接字符串:
1、
<add name="ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename= ......

asp.net写的web service例子

第一, 新建网站,选择类型为asp.net web 服务。
系统自动为你建立了个文件service.asmx.这就是一个最简单的web service服务。你可以直接运行查看效果。
第二,我们需要的是修改service.cs中的代码,来满足我们的要求。
修改后的Service.cs中的代码为:
using System;
using System.Web;
using System.Web.Services; ......

ASP.net中的validaterequest

这个属性是用来验证客户端用户的输入的,用来验证用户的输入中是否有危险字符的,这个属性的默认值为true,微软之所以这么做是为了提高asp.net程序的安全性,所以很多程序员即使不知道怎么来防御黑客的攻击,asp.net的一些默认属性等内容已经对安全进行了控制,这也是为什么asp.net的程序相对来说比较安全的原因!
  既然这个属 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号