asp.net»ñÈ¡¿Í»§¶ËµÄMACµØÖ·
asp.net»ñÈ¡¿Í»§¶ËµÄMACµØÖ·¡²Ö»ÊÊÓÃÓÚ¾ÖÓòÍø¡³
[ת]http://www.cnblogs.com/scgw/archive/2008/08/01/1213951.html
½üÈÕÔÚ×öÒ»¸öͶƱϵͳÖÐÓÐÕâÑùÒ»¸öÐèÇó£ºÎªÁË·ÀÖ¹¶ñÒâÀƱ»òˢƱ£¬ÐèҪͨ¹ýÔ¶³Ì¿Í»§¶ËµÄIPµØÖ·
À´»ñÈ¡¿Í»§¶ËÍø¿¨µÄMACµØÖ·¡£ÍíÉÏÕÒÁ˺ܶà×ÊÁÏ£¬ÖÕÓÚÓеãÊÕ»ñ¡£
ÈçºÎÈ¡µÃÍø¿¨macµØÖ·£¬¾Í²»µÃ²»½²µ½dosÃüÁNBTSTAT£¬ÏÂÃæ¼òµ¥½éÉÜÏ£º
1. ¾ßÌ幦ÄÜ
¡¡¡¡¸ÃÃüÁîÓÃÓÚÏÔʾ±¾µØ¼ÆËã»úºÍÔ¶³Ì¼ÆËã»úµÄ»ùÓÚ TCP/IP(NetBT) ÐÒéµÄ NetBIOS ͳ¼Æ×ÊÁÏ¡¢ NetBIOS Ãû³Æ±íºÍ NetBIOS Ãû³Æ»º´æ¡£ NBTSTAT ¿ÉÒÔˢРNetBIOS Ãû³Æ»º´æºÍ×¢²áµÄ Windows Internet Ãû³Æ·þÎñ (WINS) Ãû³Æ¡£Ê¹Óò»´ø²ÎÊýµÄ NBTSTAT ÏÔʾ°ïÖú¡£
2. Óï·¨Ïê½â
nbtstat [-a remotename] [-A IPaddress] [-c] [-n] [-r] [-R] [-RR] [-s] [-S] [Interval]
3. ²ÎÊý˵Ã÷
-a remotename ÏÔʾԶ³Ì¼ÆËã»úµÄ NetBIOS Ãû³Æ±í£¬ ÆäÖУ¬ remote name ÊÇÔ¶³Ì¼ÆËã»úµÄ NetBIOS ¼ÆËã»úÃû³Æ¡£ NetBIOS Ãû³Æ±íÊÇÔËÐÐÔڸüÆËã»úÉϵÄÓ¦ÓóÌÐòʹÓÃµÄ NetBIOS Ãû³ÆÁÐ±í¡£
-A IPaddress ÏÔʾԶ³Ì¼ÆËã»úµÄ NetBIOS Ãû³Æ±í£¬ ÆäÃû³ÆÓÉÔ¶³Ì¼ÆËã»úµÄ IP µØÖ·Ö¸¶¨ ( ÒÔСÊýµã·Ö¸ô ) ¡£
-c ÏÔʾ NetBIOS Ãû³Æ»º´æÄÚÈÝ¡¢ NetBIOS Ãû³Æ±í¼°Æä½âÎöµÄ¸÷¸öµØÖ·¡£
-n ÏÔʾ±¾µØ¼ÆËã»úµÄ NetBIOS Ãû³Æ±í¡£ Registered ÖеÄ״̬±íÃ÷¸ÃÃû³ÆÊÇͨ¹ý¹ã²¥»ò WINS ·þÎñÆ÷×¢²áµÄ¡£
-r ÏÔʾ NetBIOS Ãû³Æ½âÎöͳ¼Æ×ÊÁÏ¡£ ÔÚÅäÖÃΪʹÓà WINS µÄ Windows ¼ÆËã»úÉÏ£¬¸Ã²ÎÊý½«·µ»ØÒÑͨ¹ý¹ã²¥ºÍ WINS ½âÎöºÍ×¢²áµÄÃû³ÆºÅÂë¡£
-R Çå³ý NetBIOS Ãû³Æ»º´æµÄÄÚÈݲ¢´Ó Lmhosts ÎļþÖÐÖØмÓÔØ´øÓÐ #PRE ±ê¼ÇµÄÏîÄ¿¡£
-RR ÖØÐÂÊͷŲ¢Ë¢ÐÂͨ¹ý WINS ×¢²áµÄ±¾µØ¼ÆËã»úµÄ NetBIOS Ãû³Æ¡£
-s ÏÔʾ NetBIOS ¿Í»§ºÍ·þÎñÆ÷»á»°£¬²¢ÊÔͼ½«Ä¿±ê IP µØַת»¯ÎªÃû³Æ¡£
-S ÏÔʾ NetBIOS ¿Í»§ºÍ·þÎñÆ÷»á»°£¬Ö»Í¨¹ý IP µØÖ·ÁгöÔ¶³Ì¼ÆËã»ú¡£
¡¡¡¡Interval ÖØÐÂÏÔʾѡÔñµÄͳ¼Æ×ÊÁÏ£¬¿ÉÒÔÖжÏÿ¸öÏÔʾ֮¼äµÄ Interval ÖÐÖ¸¶¨µÄÃëÊý¡£ °´Ctrl+C Í£Ö¹ÖØÐÂÏÔʾͳ¼ÆÐÅÏ¢¡£Èç¹ûÊ¡ÂԸòÎÊý£¬ NBTSTAT ½«Ö»ÏÔʾһ´Îµ±Ç°µÄÅäÖÃÐÅÏ¢¡£
ÎÒÃÇÊÔÏÂËüµÄ¹¦ÄÜ£ºÔÚDOS´°¿ÚÏ£¬ÊäÈ룺
nbtstat -a 192.168.168.242
ÕâÀïµÄ192.168.168.242ÊÇÎҵı¾»úIP,²âÊÔÖз¢ÏÖ´ô»áµÄ³ÌÐò²¢²»ÄÜÈ¡µÃ·Ç±¾µØµÄmacµØÖ·£¬Ò²¾ÍÊÇ˵ֻÄÜÈ¡µÃ·þÎñÆ÷µÄÍø¿¨macµØÖ·£¬¶ø²»ÄÜÈ¡µÃ¿Í»§¶ËµÄÍø¿¨macµØÖ·£
Ïà¹ØÎĵµ£º
ÊÊÓÃÓÚ£ºmicrosoft ASP.NET
ÕªÒª:asp.net¶¯Ì¬Éú³ÉhtmlÒ³Ãæ,ÊÊÓÃ
¼ò½é
´Ë¹¦ÄÜÊÊÓÃÓÚºǫ́Êý¾Ý¿â¹¦Äܲ»Ç¿µÄwebÕ¾µã£¬¼´´ó²¿·ÖÎı¾²»ÊÇ´æ·ÅÔÚÊý¾Ý¿âµÄ¼Ç¼ÖУ¬¶øÊÇ·ÅÔÚhtmlÎļþ»òÕßxmlÎļþÖУ¬½ö½ö°ÑË÷Òý·Åµ½Êý¾Ý¿âÖУ¬ÈçÎÄÕ±êÌâ¡¢Àà±ð¡¢²éѯ¹Ø¼ü×ֵȡ£ÕâÑùÊʺÏÓÚºǫ́ûÓÐÖîÈçms Sql ServerÕâÑùµÄÊý¾Ý¿âÖ§³ÖµÄWebÕ¾µã¡£
ÊÊ ......
Eval( " ")ºÍBind( " ")¡¡ÕâÁ½ÖÖÒ»¸öµ¥Ïò°ó¶¨£¬Ò»¸öË«Ïò°ó¶¨
bindÊÇË«Ïò°ó¶¨,µ«ÐèÊý¾ÝÔ´¿É¸ü¸Ä²ÅÄÜÓÃ
ASP.NET 2.0¸ÄÉÆÁËÄ£°åÖеÄÊý¾Ý°ó¶¨²Ù×÷£¬°Ñv1.xÖеÄÊý¾Ý°ó¶¨Óï·¨DataBinder.Eval(Container.DataItem, fieldname)¼ò»¯ÎªEval(fieldname)¡£Eval·½·¨ÓëDataBinder.EvalÒ»Ñù¿ÉÒÔ½ÓÊÜÒ»¸ö¿ÉÑ¡µÄ¸ñʽ»¯×Ö·û´®²ÎÊý¡£Ëõ¶ÌµÄEv ......
Ó°ÏìASP.NetÓ¦ÓÃÐÔÄܵÄÅäÖÃ
1¡¢É¾³ý²»±ØÒªµÄHttpModule£¬Ã¿Ôö¼ÓÒ»¸öHttpModule£¬Ã¿¸öÇëÇó´¦Àí¾Í¶àÒ»µã¿ªÏú¡£
È磺
<httpModules>
& ......
ÏÂÔØÒ³Ã棺
<a href="download.ashx?url=<%=Server.UrlEncode("˵Ã÷.txt")%>">ÏÂÔØ</a>
------------------------------------------------------------------------------
download.ashx
<%@ WebHandler Language="C#" Class="download" %>
using System;
using System.Web;
public ......
»º´æÊÇ°ÑÓ¦ÓóÌÐòÖеÄÐèҪƵ·±¡¢¿ìËÙ·ÃÎʵÄÊý¾Ý±£´æÔÚÄÚ´æÖеıà³Ì¼¼Êõ£¬Í¨³£ÓÃÀ´Ìá¸ßÍøÂçµÄÏìÓ¦Ëٶȡ£ÔÚASP.NETÖÐʹÓÃCacheÀàÀ´¹ÜÀí»º´æ¡£ÏÂÃæÏêÊö¿Ø¼þ¼¶Êý¾Ý»º´æ¹¦ÄܺÍÒ³Ã漶Êý¾Ý»º´æ¹¦ÄܵÄʵÏÖ£º
(1)Êý¾Ý¿â»º´æÒÀÀµ
Êý¾Ý¿â»º´æÒÀÀµÓÉSqlCacheDependencyÀà¹ÜÀí£»
Êý¾Ý¿â»º´æÒÀÀµµÄÓŵ㣺
1¡¢Ìá¸ßÊý¾Ý³ÊÏÖËٶȣ¬Ã¿´Î»ñ ......