ASP.netÑéÖ¤Âë
¿ì¹ýÄ꣬ºÃ¾Ãûдʲô¶«Î÷ÁË¡£²»ÖªµÀ×î½üÊÇ̫æÁË£¬»¹ÊÇ×Ô¼ºÓеãÀÁ£¬Ð´Ð©×Ô¼º»ýÀ۵Ķ«Î÷¡£¶¼ÊÇЩ×î»ù±¾µÄÓ¦Ó㬺ʹó¼Ò·ÖÏíÏ¡£
ÑéÖ¤ÂëÔںܶàµØ·½¶àÓõ½£¬ÍøÉϸ÷ÖÖÐÎÐÎÉ«É«µÄ´úÂëÒ³ºÜ¶àÁË£¬ÎÒ¾ÍÊÇ´ò·¢µãʱ¼äддÁË¡£
ÔÀí£ºÍ¨¹ýGUI+Éú³ÉÓÐËĸöÊý×ÖµÄͼƬ£¬½«ËĸöÊý×Ö´æ·Åµ½SessionÖУ¬È»ºóͨ¹ýÑéÖ¤ÄãÊäÈëµÄÑéÖ¤ÂëºÍSessionÖеÄÊÇ·ñÒ»Ö£¬´ï
µ½ÑéÖ¤µÄЧ¹û¡£
À©Õ¹Ï£¬ÕâÀïÊÇËĸöÊý×ֵģ¬Èç¹ûÐèÒªÄÇÖÖºº×Ö£¬Ó¢ÎÄ×Öĸ»¹ÓÐÊý×Ö¼ÐÔÓÔÚÒ»ÆðµÄÄÇÖÖÎÒûÓÐ×ö¹ý£¬²»ÖªµÀÊÇͨ¹ý³ÌÐòÈ¥Éú³Éºº×ÖºÍÓ¢
ÎÄ×Öĸ¡£µ«ÊÇÈç¹ûÈÃÎÒ×öµÄ»°£¬¿ÉÒÔ½¨Á¢Ò»¸ö¿â£¨Îļþ£¬Êý¾Ý¿â£¬»¹ÊÇ×î¼òµ¥µÄÒ»¸öÊý×飩´æ·ÅЩºº×Ö£¬Ó¢ÎÄ×Öĸ¡£Ëæ»ú³éÈ¡³öÀ´Éú³É¡£
¾Í¿ÉÒÔʵÏÖÁË¡£»¹ÓоÍÊÇÕâ¸öÉú³É³öÀ´µÄͼƬÊÇ50*22ÏñËصĵģ¬Èç¹ûÄãÒªÉú³É³ö¸ü´ó»òÕßСµãµÄ£¬ÐèÒªÐÞ¸ÄϳÌÐò¡£Ã»ÓÐ×öµ½Í¨ÓÃÊÇ
ÎÒµÄ×ï¹ý¡£¡£¡£
Éú³ÉÑéÖ¤ÂëͼƬ£º
CodeImg.aspx.csÎļþ
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CodeImg.aspx.cs" Inherits="Purdue.CRM.Web.inc.CodeImg" %>
CodeImg.csÎļþ
using System;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
namespace Purdue.CRM.Web.inc
{
public partial class CodeImg : System.Web.UI.Page
{
public static String realCode="";
protected void Page_Load(object sender, EventArgs e)
{
//µ÷Óú¯Êý½«ÑéÖ¤ÂëÉú³ÉͼƬ
this.CreateCheckCodeImage(GenerateCheckCode());
}
private string GenerateCheckCode()
{
//²úÉúËÄλµÄËæ»ú×Ö·û´®
int number;
char code;
string checkCode = String.Empty;
System.Random random = new Random();
for (int i = 0; i < 4; i++)
{
number = random.Next();
code = (char)('0' + (char)(number % 10));
checkCode += code.ToString();
Ïà¹ØÎĵµ£º
ASP.NetµÄvalidateRequest=false
validateRequest="false" Ö¸ÊÇ·ñÒªIISÑéÖ¤Ò³ÃæÌá½»µÄ·Ç·¨×Ö·û£¬±ÈÈ磺>,<ºÅµÈ,µ±ÎÒÃÇÐèÒª½«Ò»¶¨¸ñʽµÃhtml´úÂë»ñµÃ£¬²åÈëÊý¾Ý¿âʱºò£¬¾ÍÒª½«Õâ¸öÊôÐÔÉèÖÃΪfalse,ÀýÈçÄ㽫×ÖÌå¼Ó´ÖµÈ²Ù×÷ʱ¡£
ASP.Net 1.1ºóÒýÈëÁË ......
½üÀ´£¬Ëæ×ÅMono2.4ºÍJexus web server 2.3µÄ³É¹¦·¢²¼£¬ÔÚLinux ƽ̨¼ÜÉèAsp.netµÄʱ»úÒѾÍêÈ«³ÉÊì¡£ÓÉÓÚLinux·þÎñÆ÷ϵͳËù¾ß±¸µÄ´óÁ¿µÄÓŵ㣬¿ÉÒÔÔ¤¼Æ£¬¿çƽ̨µÄLinux ASP.NETÍøÕ¾±Ø½«½øÈëÎÒÃǵŤ×÷ÓëÉú²úʵ¼Ê¡£
Ãû´Ê½âÊÍ£º
Ò»¡¢Mono:
MonoÊÇÒ»¸ö¿ªÔ´ÏîÄ¿£¬ÊÇ°´ECMA-335¶¨ÒåµÄ±ê×¼Ö´ÐÐ.NET¿ò¼Ü£¬¼òµ¥µØ˵£¬Mono¾ÍÊÇ ......
×î½ü¿ª·¢ExtÓ¦Óã¬Ê¹ÓÃajaxÇëÇóÊý¾Ýʱ£¬Óöµ½ÁËÇëÇóÊý¾ÝÒÔ·µ»Ø£¬µ«IEÀïÈ´ÎÞ·¨ÏÔʾµÄ¹ÖÎÊÌâ¡£
ʹÓÃHTTPWatch²é¿´£¬·¢ÏÖERROR_INTERNET_CONNECTION_RESET¡£
ʹÓÃFireFoxºÍgoogleä¯ÀÀÆ÷¶¼Ã»ÓÐÎÊÌ⣬ÍøÉϲéÕÒ˵ÍøÕ¾·ÅÔÚIISÉÏûÓÐÎÊÌ⣬ÊÔÑéºóÖ¤Ã÷ÓÐЧ¡£
µ«Í¬Ê¿ª·¢Óûú´ó²¿·Ö¶¼ÊÇXPϵͳ£¬Óв¿·Ö»¹ÊÇHOME°æ£¬Òò´Ë¸ÃÎÊÌâ±ØÐëÕÒµ ......
£¨±¸×¢£ºÎÄÖкìÉ«×ÖÌåÊÇÎÒÔÚÔÎĵĻù´¡ÉÏÌí¼ÓµÄ½âÊÍ˵Ã÷£©
΢ÈíµÄʵÀý½Ì²ÄÖн²ÁËÈýÖÖÓïÑÔ£ºc#¡¢vb ¡¢Jscript£¬ÎªÁËÈôó¼Ò¹ýÒ»°Ñж«Î÷ñ«£¬ÎÒÃÇ»¹ÊÇѧc#°É¡£Õâ¸ö×îºÃÓÐÒ»µãc++»ù´¡¡£
²»¹ýûÓÐҲûÓйØϵ£¬´ó²»Á˶à·ÑµãÁ¦ÁË¡£
ÈκÎÒ»ÃÅÓ ......
ÔÚWebÓ¦ÓóÌÐòÉÏÏÂÎÄÖУ¬ASP.NETÒ³Ãæ»áÔÚµÚÒ»´Î±»ÇëÇóʱ£¬°´Ðè±»¶¯Ì¬±àÒë¡£¶¯Ì¬±àÒë²¢²»ÊÇASP.NETÒ³Ãæ(.aspxÎļþ)ÌØÓеģ¬»¹·¢ÉúÔÚ.NET Web·þÎñ(.asmxÎļþ)¡¢WebÓû§¿Ø¼þ(.ascxÎļþ)¡¢HTTP´¦Àí³ÌÐò(.ashxÎļþ)£¬ÒÔ¼°ÆäËû¼¸ÖÖASP.NETÓ¦ÓóÌÐòÎļþ(Èçglobal.asaxÎļþ)ÉíÉÏ¡£ÔËÐÐʱ¹ÜµÀÄ£Ð͸ºÔð´¦ÀíÊäÈëµÄ(incoming)HTTPÊý¾Ý°ü ......