[置顶] 中华人民共和国劳动合同法

[置顶] 学习资源收藏[2007-04-18更新]

[置顶] 常用CHM帮助文档集锦下载[2008-08-24更新]

Subsonic介绍及使用

SubSonic是一个类似Rails的开源.NET项目。你可以把它看作是一把瑞士军刀,它可以用来构建Website和通过ORM方式来访问数据。Rob Conery和Eric Kemp是推动SubSonic的主要开发人员,与项目良好的发展有着密切的关系。作为一个开发人员生产力工具,SubSonic通过从基础上支持软件开发的迭代本质,自动化了数据驱动的应用程序开发中重复性的、无趣的过程。通过这个自动生成的Web-Based的数据操纵的“架子”,轻量级和灵活的查询工具,以及一个不断丰富功能的用于通用业务数据验证和转换需要的类库,SubSonic让开发人员可以快速的构建他们的应用程序,而不是一些支撑的基础系统。SubSonic支撑着几个开源项目,如dotnetkicks.com,并且目前正被集成到一个顶级的ASP.NET的博客平台上。使用SubSonic的既有业余开发的个人应用程序,也有一些500强企业。

标签:

在Asp.Net中创建MetaWeblog API

概念 metaweblog是基于XML的RPC通信( 下载 )。这意味着你有一组预先定义的结构(简单的数据类型属性 )表示,正转客户端和服务器之间。 您需要使用MetaWeblog API 的以下六个结构: BlogInfo: 有关博客的网址, ID或名称。 UserInfo: 博客用户的ID ,名字,姓氏或电子邮件。 Post: 就是博客帖子,标题,正文和类别。 CategoryInfo: 博客类别信息,编号和名称。 MediaObject: 有关媒体对象(图像,音频和其他文件类型)的名称,类型和数据。 MediaObjectInfo: 媒体对象。

标签:

GridView Tips and Tricks using ASP.NET – Part III

The GridView control is quiet a handy control and is the most commonly used control when building an ASP.NET site. The more you work with it, the more you realize how powerful it can be while presenting data.For this article, we would be using the following template to populate the GridView.

标签:

Some More GridView Tips and Tricks using ASP.NET - Part II

The GridView control is quiet a handy control and is the most commonly used control when building an ASP.NET site. The more you work with it, the more you realize how powerful it can be while presenting data.

标签:

GridView Tips and Tricks using ASP.NET 2.0

The GridView control is quiet a handy control and is the most commonly used control when building an ASP.NET site. The more you work with it, the more you realize how powerful it can be while presenting data. In this article, we will explore some of the most frequently asked questions about the GridView control. The article discusses ten tips and tricks that you can use while using the GridView control.

标签:

LINQ -对付SQL Injection的"免费补洞策略"

一连串的Mass SQL Injection攻击,让我们回忆起数年前的SQL Injection攻击,多年后的今天,我们仍深陷于同样的危机中,本文详述SQL Injection的历史、肇因、解决及侦测方法,更为读者们引介全新、更加安全的防堵SQL Injection策略。什么是SQL Injection? SQL Injection,中译为SQL注入,更为人知的名称是【资料隐码攻击】,意指开发人员于撰写网页应用程式之际,贪图一时方便或是依循前人的惯性写法而开启的一道门。在数年前,一次大型的隐码攻击行动,唤起了所有网站拥有者及设计人员的防骇之心,让我们认知到,网站是一个曝露在所有人面前的公共园地,其安全性不容忽视!在那次的攻击行动中,有数千个网站遭到同一种手法入侵,泄露的资料及因入侵所损失的金额难以估计,而起源竟只是程式设计师的惯性及疏于防范,而我们都曾经是其中一份子。

标签:

Coding techniques for protecting against Sql injection

Over the past few weeks there have been reports and commentary about SQL injection attacks being launched against both classic ASP and ASP.NET sites (some details at http://blogs.iis.net/bills/archive/2008/04/26/sql-injection-attacks-on-iis-web-servers.aspx ). Included in this post are VB.NET and C# samples that can be used to screen incoming query-string, form and cookie values for potential Sql injection values. However because valid input data varies from website to website, it is not possible to write a one-size-fits-all screening mechanism. You can modify the sample code included in this post to tighten or loosen the character sequences as appropriate for your website. Also as a reminder, if a website makes heavy use of dynamically constructed Sql (as opposed to parameterized Sql or parameterized stored procedures) it is a best practice to escape all single quotes contained in un-trusted web input. Since it is not possible to make this replacement using the HttpModule/BeginRequest approaches shown below, you can instead scrub a website's code and perform the escaping in all places where dynamic Sql is being built.

标签:

快速开发应用程序

今年年底,Microsoft 发布了 ASP.NET MVC Framework,它使开发人员能够编写基于模型视图控制器的 Web 应用程序。许多 ASP.NET 开发人员一直热切期望将它作为标准 ASP.NET 页面模型的替代品。不过,别担心—ASP.NET 页面模型不会从此消失。而是现在我们又多了一个选项。ASP.NET MVC Framework 为目标划分了明确的界线,使开发 Web 应用程序变得更容易。页面逻辑将存储在控制器中、HTML 将存储在视图中、应用程序逻辑将存储在模型中。

标签:

C#版 Tag云图控件

今天看到TerryLee的一篇文章http://www.cnblogs.com/Terrylee/archive/2008/02/20/1075764.html,其中有一条ASP.NET Tag/Search Cloud Server Control(导读:在Web2.0时代,Tag成为了一个标志,通常一些网站都会采用Tag云图来显示。有“好事者”干脆开发了一个Tag云的ASP.NET服务器控件),里边的源文件是用vb写的,我就把代码改改,转换成C#的了,代码我直接贴出来吧,大家自己看吧!

标签:

Asp.Net应用程序中为什么要MachineKey?如何生成MachineKey?

原文:博客堂宝玉http://blog.joycode.com/dotey/archive/2007/01/23/92460.aspx

如果你的Asp.Net程序执行时碰到这种错误:“验证视图状态 MAC 失败。如果此应用程序由网络场或群集承载,请确保 <machineKey> 配置指定了相同的 validationKey 和验证算法。不能在群集中使用 AutoGenerate”那么说明你没有让你的应用程序使用统一的machineKey,那么machineKey的作用是什么呢?按照MSDN的标准说法:“对密钥进行配置,以便将其用于对 Forms 身份验证 Cookie 数据和视图状态数据进行加密和解密,并将其用于对进程外会话状态标识进行验证。”也就是说Asp.Net的很多加密,都是依赖于machineKey里面的值,例如Forms 身份验证 Cookie、ViewState的加密。默认情况下,Asp.Net的配置是自己动态生成,如果单台服务器当然没问题,但是如果多台服务器负载均衡,machineKey还采用动态生成的方式,每台服务器上的machinekey值不一致,就导致加密出来的结果也不一致,不能共享验证和ViewState,所以对于多台服务器负载均衡的情况,一定要在每台站点配置相同的machineKey。

machineKey生成的算法:

   1: validationKey = CreateKey(20); 
   2:  
   3: decryptionKey = CreateKey(24); 
   4:  
   5:      protected string CreateKey(int len) 
   6:  
   7:      { 
   8:  
   9:             byte[] bytes = new byte[len]; 
  10:  
  11:             new RNGCryptoServiceProvider().GetBytes(bytes); 
  12:  
  13:               StringBuilder sb = new StringBuilder(); 
  14:  
  15:               for(int i = 0; i < bytes.Length; i++) 
  16:  
  17:               {    
  18:  
  19:                    sb.Append(string.Format("{0:X2}",bytes[i])); 
  20:  
  21:               } 
  22:  
  23:               return sb.ToString(); 
  24:  
  25:      } 

附参考的matchineKey配置:

   1: <?xml version="1.0"?> 
   2:  
   3: <configuration> 
   4:  
   5:   <system.web> 
   6:  
   7:     <machineKey validationKey="3FF1E929BC0534950B0920A7B59FA698BD02DFE8" decryptionKey="280450BB36319B474C996B506A95AEDF9B51211B1D2B7A77" decryption="3DES" validation="SHA1"/> 
   8:  
   9:      </system.web> 
  10:  
  11: </configuration>

标签: