ASP.NET»ù±¾·Ö²¼Ê½»º´æMemcached²âÊÔʵÀý
±¾ÎÄÊ×·¢£ºhttp://www.xueit.com/html/2009-11-12/21-932220455859.html
ÏÂÃæ²âÊÔÏ·ֲ¼Ê½»º´æMemcachedÈí¼þ£¬Ò»Ö±ÔÚѧϰ¹Ø×¢´ó·ÃÎÊÁ¿ÍøÕ¾µÄ»º´æÊÇÈçºÎʵÏÖ£¬Ö®Ç°¿´¹ýMemcachedµÄ×ÊÁÏ£¬Ã¦ÓÚûÓÐʱ¼äÀ´ÕæÕý²âÊÔһϣ¬±¾ÎIJâÊÔ·Ö²¼Ê½»º´æMemcachedµÄ»·¾³ÈçÏ£º£¨Á½Ì¨µçÄÔ×÷Ϊ·þÎñÆ÷£©
µÚһ̨£º
CPU:Inter£¨R£© Pentium£¨R£© 4 CPU 2.8G
Äڴ棺1G
ϵͳ£ºwindows 7
IIS£º IIS 7
IP£º172.10.1.97
»·¾³£º±¾µØ
°²×°£ºmemcached 1.2.1 for Win32
µÚ¶þ̨£º
CPU:Inter£¨R£© Pentium£¨R£© 4 CPU 3.0G
Äڴ棺2G
ϵͳ£ºwindows Server 2003
IIS£º IIS 6
IP£º172.10.1.236
»·¾³£ºÔ¶³Ì
°²×°£ºmemcached 1.2.1 for Win32
²âÊÔ³ÌÐò²¿Êðµ½±¾µØ»·¾³£¨172.10.1.97£©£¬¿ª·¢¹¤¾ßVS2008 .NET3.5
±¾ÎÄʹÓõ½memcached 1.2.1 for Win32ÏÂÔصØÖ·£º
http://jehiah.cz/projects/memcached-win32/
¸ü¶àmemcached°æ±¾´óÈ«Çë½øÈë
http://www.xueit.com/html/2009-11-12/32-1550931594781.html
ºÃÁË£¬ÏÂÃæÎÒÃÇ°´²½ÖèÀ´²âÊÔ£º
µÚÒ»¡¢Ê×Ïȵ½°ÑÏÂÔغõÄmemcached 1.2.1½âѹµ½C£º\memcachedĿ¼£¬·Ö±ð¸´ÖƵ½Á½Ì¨·þÎñÆ÷ÖС£
µÚ¶þ¡¢°²×°memcached·þÎñ£¬ÔÚÃüÁîÌáʾ·ûÊäÈëCD c£º\memcached½øÈëµ½memcachedĿ¼£¬ÈçÏÂͼ£º
Ö®ºóÊäÈëmemcached -h »Ø³µ£¬¿´°ïÖú˵Ã÷£¬½ÓÏÂÀ´ÊäÈëmemcached -d install »Ø³µ¼´¿É×Ô¶¯°²×°memcached·þÎñÁË£¬ÈçÏÂͼ£º
°²×°memcached·þÎñͼ
°²×°ºÃ°²×°memcached·þÎñºó£¬ÊäÈëmemcached -d start »Ø³µÆô¶¯memcached·þÎñ£¬ÈçÏÂͼ£º
Æô¶¯memcached·þÎñͼ
ÔÚ172.10.1.97Óë172.10.1.236Á½Ì¨µçÄÔ¶¼°´ÒÔÉϲÙ×÷À´°²×°Æô¶¯memcached¡£
µÚÈý¡¢ÏÂÔØ.NET°æmemcached¿Í»§¶ËAPI×é¼þÀ´Ð´²âÊÔ³ÌÐò¡£
±¾ÎÄʹÓÃmemcacheddotnet£¬ÏÂÔصØÖ·ÈçÏ£º
http://sourceforge.net/projects/memcacheddotnet/
ÏÂÔغÃÖ®ºó°ÑÕâЩÎļþCommons.dll£¬ICSharpCode.SharpZipLib.dll£¬log4net.dll£¬Memcached.ClientLibrary.dll·Åµ½binĿ¼£¨ÉÙÒ»¸ö¶¼²»ÐУ©£¬Ö®ºóÔÙµ½²âÊÔÏîÄ¿¿ª·¢»·¾³ÒýÓÃMemcached.ClientLibrary.dll£¬ÈçÏÂͼ
ÒýÓÃMemcached.ClientLibrary.dllͼ
µÚËÄ¡¢²âÊÔ³ÌÐò£º
ÒÔÏÂΪÒýÓõÄÄÚÈÝ£º
using System;
using System.Collections;
using System.Text;
// ÐëÒýÓÃMemcached
using Memcached.ClientLibrary;
namespace test
{
public partial class _Default : System.Web.UI.Page
{
Ïà¹ØÎĵµ£º
ÔÚWeb±à³Ì¹ý³ÌÖУ¬´æÔÚןܶలȫÒþ»¼¡£±ÈÈçÔÚÒÔÇ°µÄASP°æ±¾ÖУ¬CookieΪ·ÃÎÊÕߺͱà³ÌÕ߶¼ÌṩÁË·½±ã£¬²¢Ã»ÓÐÌṩ¼ÓÃܵŦÄÜ¡£´ò¿ªIEä¯ÀÀÆ÷£¬Ñ¡Ôñ“¹¤¾ß”²Ëµ¥ÀïµÄ“InternetÑ¡Ï¬È»ºóÔÚµ¯³öµÄ¶Ô»°¿òÀïµ¥»÷“ÉèÖÔ°´Å¥£¬Ñ¡Ôñ“²é¿´Îļþ”°´Å¥£¬ÔÚµ¯³öµÄ´°¿ÚÖУ¬¾Í»áÏÔʾӲÅÌÀï ......
1. ÓÃResponse.Write·½·¨
¡¡¡¡´úÂëÈçÏ£º
Response.Write("<script type='text/javascript'>alert("XXX");</script>");
´Ë·½·¨È±ÏݾÍÊDz»Äܵ÷Óýű¾ÎļþÖеÄ×Ô¶¨ÒåµÄº¯Êý£¬Ö»Äܵ÷ÓÃÄÚ²¿º¯Êý£¬¾ßÌåµ÷ÓÃ×Ô¶¨ÒåµÄº¯ÊýÖ»ÄÜÔÚResponse.WriteдÉϺ¯Êý¶¨ Ò壬±ÈÈç
Response.Write("<script type='tex ......
Ê×ÏÈ¿´Êý¾Ý¿â±í½á¹¹£º
´úÂëÈçÏ£º
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.Htm ......
ASP.net »ñµÃ¿Í»§¶ËµÄIP£¬×î³£¼ûµÄÊÇʹÓÃÏÂÊö´úÂ룺
string user_IP = System.Web.HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
¶ÔÓÚÁ˽â´úÀí·þÎñÆ÷Çé¿öµÄÈË£¬ÎÒÃÇ»áÖªµÀ£¬Èç¹ûÓû§Ê¹ÓÃÁË´úÀí·þÎñÆ÷£¬ÉÏÊö´úÂë»ñµÃµÄÊÇ´úÀí·þÎñÆ÷µÄIPµØÖ·£»Èç¹ûÓû§Ê¹ÓÃÁ˶à¸ö´úÀí·þÎñÆ÷£¬ÔòÊǵ½´ï·þÎñÆ÷µÄ×îºóÒ»¸ö´úÀí· ......
MysqlµÄconnector/net5.0ÏÂÔصØÖ·:
http://dev.mysql.com/get/Downloads/Connector-Net/mysql-connector-net-5.0.6.zip/from/pick
°²×°ºÃÒÔºó,
µãÊôÐÔ,È»ºóµã²éÕÒÄ¿±ê,µãÏòÉÏÒ»²ãĿ¼,ÕÒµ½Binaries\.NET 2.0,È»ºó½«Õâ¸öÎļþ¸´ÖƵ½ÄãµÄ¹¤³ÌĿ¼ÏÂ,Ò»°ãÕâÑùµÄDLLÎļþ»á±£´æµ½binĿ¼ÏÂ.
ÔÚ´úÂëÒ³ÀïÊäÈëusing Mysql. ......