ASP.NetÖÐÀûÓÃashxʵÏÖͼƬ·ÀµÁÁ´´úÂë
GET /Img.ashx?img=svn_work.gif HTTP/1.1
Accept: */*
Referer: http://www.svnhost.cn/
Accept-Language: zh-cn
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; CIBA)
Host: www.svnhost.cn
Connection: Keep-Alive
¸ÃÊý¾Ý°ü±íʾÇëÇóhttp://www.svnhost.cn/Img.ashx?img=svn_work.gifÎļþ¡£ÎÒÃÇ¿ÉÒÔ¿´µ½Referer±íʾÉÏÒ»Ò³ÇëÇóÒ³ÃæµØÖ·£¬Ò²¾ÍÊÇÎļþÀ´Ô´¡£Host±íʾµ±Ç°ÇëÇóµÄÖ÷»úµØÖ·¡£
ÏÂÃæÊÇÒ»¸öµÁÁ´µÄÊý¾Ý°ü
GET /Img.ashx?img=svn_work.gif HTTP/1.1
Accept: */*
Referer: http://745.cc/
Accept-Language: zh-cn
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; CIBA)
Host: www.svnhost.cn
Connection: Keep-Alive
ÎÒÃÇ¿ÉÒÔ¿´µ½£¬ÉÏÃæÁ½¸öÊý¾Ý£¬±íʾ¶ÔÓÚͬһ¸öÎļþ£ºhttp://www.corange.cn/Img.ashx?img=svn_work.gifµÄÇëÇó¹ý³Ì£¬ÕâÀïµÄ²»Í¬¾ÍÊÇReferer£¬Ò²¾ÍÊǶ¼ÊÇÇëÇóͬһ¸öÎļþ£¬µ«ÊÇÇëÇóµÄÀ´Ô´ÊDz»Í¬µÄ¡£Òò´ËÎÒÃÇ¿ÉÒÔÔÚ³ÌÐòÀïÅжÏÊÇ·ñÊÇÀ´Ô´ÓÚµ±Ç°·þÎñÆ÷£¬À´ÅжÏÊÇ·ñÊǵÁÁ´¡£Ã÷°×ÔÀíÒÔºó£¬ÊµÏÖ·ÀµÁÁ´¾Í·Ç³£¼òµ¥ÁË¡£ÏÂÃæÒÔͼƬ·ÀµÁÁ´À´ÊµÏÖÒ»¸öÑÝʾ¡£ASP.NETÖÐÌí¼ÓÒ»¸öimg.ashxÎļþ£¬È»ºóºǫ́´úÂëÈçÏ£º
using System;
using System.Collections;
using System.Data;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
namespace GetImage
{
/// <summary>
/// $codebehindclassname$ µÄժҪ˵Ã÷
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class Img : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "image/jpg";
if (context.Request.UrlReferrer != null && context.Request.UrlReferrer.Host.Equals(context.Request.Url.Host, StringComparison.InvariantCultureIgnoreCase))
context.Response.WriteFile(context.Server.MapPath(
Ïà¹ØÎĵµ£º
1. ´ò¿ªÐµĴ°¿Ú²¢´«ËͲÎÊý£º
´«ËͲÎÊý£º
response.write("<script>window.open('*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"')</script>")
½ÓÊÕ²ÎÊý£º
string a = Request.QueryString("id");
string b = Request.QueryString("id1");
2.Ϊ°´Å¥Ìí¼Ó¶Ô»°¿ò
Button1.Att ......
Ò»£¬JS¶¯Ì¬´´½¨±íµ¥
var result = " <form method='post' action='../xiazai.aspx'><table width='100%' border='0' cellpadding='0' cellspacing='1' bgcolor='#BDB4A2'>"+
"&l ......
using System.Web;
/// <summary>
/// Javascript³£Ó÷½·¨
/// </summary>
public class JS
{
private static string ScriptStart = "<script type=\"text/javascript\">";
private static string ScriptEnd = "</script>";
&n ......
ASP.NET 4°üÀ¨ÁËһϵÁÐеÄÔËÐÐʱÌØÐÔ£¬¿ÉÒÔ°ïÖúÄã½øÒ»²½ÓÅ»¯ÄãµÄÍøÕ¾¡£ÆäÖÐһЩÐÂÌØÐÔ¿ÉÒÔÓÃÀ´½øÐÐSEOÓÅ»¯ÒÔÌá¸ßÍøÕ¾ÔÚËÑË÷ÒýÇæÖеÄÅÅÃûºÍȨÖØ£¬ÕâЩÌØÐÔ°üÀ¨£º
еÄPage.MetaKeywords ºÍ Page.MetaDescription ÊôÐÔ
Õë¶ÔASP.NET Web FormsµÄÐÂURLµ¼ÏòÖ§³Ö
еÄResponse.RedirectPermanent()·½·¨
ÏÂÃæÊÇÈçºÎÀûÓÃÕâÐ ......