ASP.NET ץȡÍøÒ³Ô´Îļþ
×öÏîÄ¿·ÖÏíµÄʱºòҪץȡÍøÒ³ÀïÃæµÄͼƬ£¬¼°ÊÓƵ£¬±êÍ·¡£µ±È»ÒªÈ¡µ½ÕâЩ¶«Î÷֮ǰ£¬±ØÐë°ÑÔ´Îļþ¶Á³öÀ´
£¬Äõ½Ô´ÎļþÖ®ºó¾ÍÓÃJSÕýÔòȡͼƬºÍÊÓƵÁË£¨JSÕýÔò»¹²»ÍêÃÀ£¬ÏȲ»Ìù£©
C#ץȡÍøÒ³Ô´Îļþ´úÂëÈçÏ£º
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.HtmlControls;
using System.Net;
using System.IO;
using System.Text;
namespace WebApplication3
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
tb.Text = "";
try
{
WebRequest request = WebRequest.Create("http://v.youku.com/v_show/id_XMTMxMzQyOTQ0.html");
WebResponse response = request.GetResponse();
StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.GetEncoding("UTF-8"));
tb.Text = reader.ReadToEnd();
reader.Close();
reader.Dispose();
response.Close();
}
catch (Exception ex)
{
tb.Text = ex.Message;
}
}
}
}
}
Ïà¹ØÎĵµ£º
ÿ´Î½«ÍøÒ³·¢Ë͵½·þÎñÆ÷ʱ£¬¶¼»á´´½¨ÍøÒ³ÀàµÄÒ»¸öÐÂʵÀý¡£ÔÚ´«Í³µÄ Web ±à³ÌÖУ¬Õâͨ³£Òâζ×ÅÔÚÿһ´ÎÍù·µÐгÌÖУ¬Óë¸ÃÒ³¼°¸ÃÒ³ÉϵĿؼþÏà¹ØÁªµÄËùÓÐÐÅÏ¢¶¼»á¶ªÊ§¡£ÀýÈ磬Èç¹ûÓû§½«ÐÅÏ¢ÊäÈëµ½Îı¾¿ò£¬¸ÃÐÅÏ¢½«ÔÚ´Óä¯ÀÀÆ÷»ò¿Í»§¶ËÉ豸µ½·þÎñÆ÷µÄÍù·µÐгÌÖжªÊ§¡£
ΪÁ˽â¾ö´«Í³µÄ Web ±à³Ìµ ......
1. Êý¾Ý¿â·ÃÎÊÐÔÄÜÓÅ»¯
Êý¾Ý¿âµÄÁ¬½ÓºÍ¹Ø±Õ
·ÃÎÊÊý¾Ý¿â×ÊÔ´ÐèÒª´´½¨Á¬½Ó¡¢´ò¿ªÁ¬½ÓºÍ¹Ø±ÕÁ¬½Ó¼¸¸ö²Ù×÷¡£ÕâЩ¹ý³ÌÐèÒª¶à´ÎÓëÊý¾Ý¿â½»»»ÐÅÏ¢ÒÔͨ¹ýÉí·ÝÑéÖ¤£¬±È½ÏºÄ·Ñ·þÎñÆ÷×ÊÔ´¡£ASP.NETÖÐÌṩÁËÁ¬½Ó³Ø(Connection Pool)¸ÄÉÆ´ò¿ªºÍ¹Ø±ÕÊý¾Ý¿â¶ÔÐÔÄܵÄÓ°Ï졣ϵͳ½«Óû§µÄÊý¾Ý¿âÁ¬½Ó·ÅÔÚÁ¬½Ó³ØÖУ¬ÐèҪʱȡ³ö£¬¹Ø±ÕʱÊÕ»ØÁ¬½ ......
Ö±½ÓÔÚASP.netÖÐÉÏ´«´óÎļþµÄ·½·¨£®
·½·¨Ò»£ºÔÚweb.configÖÐÌí¼Ó<httpRuntime maxRequestLength="100000" executionTimeout="45"/>
·½·¨¶þ£ºÐ޸ģɣɣÓÅäÖÃÎļþwindows->system32->inetsrv->metaBase.XML
·½·¨Èý£º
1£® httpHandler or HttpModule
a.ÔÚASP.net½ø³Ì´¦ÀírequestÇëÇó֮ǰ½Ø»ñ ......
Asp.net ÓÃurlÖØд(URLReWriter)ʵÏÖÈÎÒâ¶þ¼¶ÓòÃû
ÎÒ×î½üдÁ˸öСÀý×Ó,´ó¼Ò¿ÉÒÔÏÈ¿´Õâ¸ö,ÀïÃæÓÐСÀý×ÓµÄÍêÕû´úÂëÏÂÔØ.
http://www.cnblogs.com/notus/archive/2009/03/26/1422548.html
ºÃ¾ÃûÓÐд¼¼ÊõÎÄÕÂ,Èç¹û´ó¼Ò¿´²»Ã÷°×,¾Í¶à¿´¼¸Æª,º¹,»òÕß,ÔÚÎÄÕµĺóÃæ»Ø¸´(ÕâÊÇ×îÓÐЧµÄ°ì·¨),ÎһᾡÁ¦°ïÖú´ó¼Ò½â´ðÒÉ»ó.
À´ ......