asp.net Óʼþ·¢ËÍ
//ʵÀý»¯Ò»¸öSmtpClientsmtp.DeliveryMethod = SmtpDeliveryMethod.Network;
SmtpClient smtp = new SmtpClient();
smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
//½«smtpµÄ³öÕ¾·½Ê½ÉèΪ Networksmtp.EnableSsl = false;
//smtp·þÎñÆ÷ÊÇ·ñÆôÓÃSSL¼ÓÃÜ
smtp.EnableSsl = false;
//Ö¸¶¨ smtp ·þÎñÆ÷µØÖ·smtp.Port = 25;
//Ö¸¶¨ smtp ·þÎñÆ÷µÄ¶Ë¿Ú£¬Ä¬ÈÏÊÇ25£¬Èç¹û²ÉÓÃĬÈ϶˿ڣ¬¿ÉÊ¡È¥
//Èç¹ûÄãµÄSMTP·þÎñÆ÷²»ÐèÒªÉí·ÝÈÏÖ¤£¬ÔòʹÓÃÏÂÃæµÄ·½Ê½£¬²»¹ý£¬Ä¿Ç°»ù±¾Ã»Óв»ÐèÒªÈÏÖ¤µÄÁËsmtp.UseDefaultCredentials = true;
//Èç¹ûÐèÒªÈÏÖ¤£¬ÔòÓÃÏÂÃæµÄ·½Ê½smtp.Credentials = new NetworkCredential("ÓÊÏäÕʺÅ@163.com", "ÓÊÏäÃÜÂë");
smtp.Host = "www.126.com";
smtp.Port = 25;
smtp.UseDefaultCredentials = true;
smtp.Credentials = new NetworkCredential("lxw098@126.com", "ziyun890824x");
//ʵÀý»¯Ò»¸öÓʼþÀà
MailMessage mm = new MailMessage();
//ÓʼþµÄÓÅÏȼ¶£¬·ÖΪ Low, Normal, High£¬Í¨³£Óà Normal¼´¿É
mm.Priority = MailPriority.High;
//ÊÕ¼þ·½¿´µ½µÄÓʼþÀ´Ô´,
//µÚÒ»¸ö²ÎÊýÊÇ·¢ÐÅÈËÓʼþµØÖ·
//µÚ¶þ²ÎÊýÊÇ·¢ÐÅÈËÏÔʾµÄÃû³Æ
//µÚÈý¸ö²ÎÊýÊǵڶþ¸ö²ÎÊýËùʹÓõıàÂ룬Èç¹ûÖ¸¶¨²»ÕýÈ·£¬Ôò¶Ô·½ÊÕµ½ºóÏÔʾÂÒÂë
//936ÊǼòÌåÖÐÎĵÄcodepageÖµ
mm.from = new MailAddress("lxw098@126.com", "ÕæÓÐÒâ˼", Encoding.GetEncoding(936));
//ReplyTo ±íʾ¶Ô·½»Ø¸´ÓʼþʱĬÈϵĽÓÊÕµØÖ·£¬¼´£ºÄãÓÃÒ»¸öÓÊÏä·¢ÐÅ£¬µ«È´ÓÃÁíÒ»¸öÀ´ÊÕÐÅ
//ÉÏÃæºóÁ½¸ö²ÎÊýµÄÒâÒ壬 ͬ from µÄÒâÒå
mm.ReplyTo = new MailAddress("lxw098@126.com", "ÎҵĽÓÊÕÓÊÏä", Encoding.GetEncoding(936));
//ÓʼþµÄ³ËÍÕߣ¬Ö§³ÖȺ·¢£¬¶à¸öÓʼþµØÖ·Ö®¼äÓðë½Ç¶ººÅ ·Ö¿ª
//µ±È»Ò²¿ÉÒÔÓÃÈ«µØÖ·£¬ÈçÏ£ºmm.CC.Add(new MailAddress("a@163.com", "³ËÍÕßA", Encoding.GetEncoding(936)));mm.CC.Add(new MailAddress("b@163.com", "³ËÍÕßB", Encoding.GetEncoding(936)));mm.CC.Add(new MailAddress("c@163.com", "³ËÍÕßC", Encoding.GetEncoding(936)));mm.Bcc.Ad
Ïà¹ØÎĵµ£º
ASP.NET»ñÈ¡¿Í»§¶ËIP/Óû§ÃûµÈÐÅÏ¢
1. ÔÚASP.NETÖÐרÓÃÊôÐÔ£º
»ñÈ¡·þÎñÆ÷µçÄÔÃû£ºPage.Server.ManchineName
»ñÈ¡Óû§ÐÅÏ¢£ºPage.User
»ñÈ¡¿Í»§¶ËµçÄÔÃû£ºPage.Request.UserHostName
»ñÈ¡¿Í»§¶ËµçÄÔIP£ºPage.Request.UserHostAddress
2. ÔÚÍøÂç±à³ÌÖеÄͨÓ÷½·¨£º
»ñÈ¡µ±Ç°µçÄÔÃû£ºstatic System. ......
×î½üÔÚ¹úÍâµÄÍøÕ¾ÂÒ×ßһͨ£¬·¢ÏÖһЩ±È½ÏºÃµÄÎÄÕ£¬ÊÕ¼¯ÕûÀí¼ÓÓÚ×Ô¼ºµÄÀí½â£¬×÷Ϊ±Ê¼ÇÐÎʽ¼Ç¼ÏÂÀ´£¬ÈÃÒÔºó×Ô¼ºÓиö»ØÒä¡£
¡¡¡¡ASP.NETÊÇÒ»¸ö·Ç³£Ç¿´óµÄ¹¹½¨WebÓ¦ÓõÄƽ̨,ËüÌṩÁ˼«´óµÄÁé»îÐÔºÍÄÜÁ¦ÒÔÖÂÓÚ¿ÉÒÔÓÃËüÀ´¹¹½¨ËùÓÐÀàÐ͵ÄWebÓ¦ÓÃ.¾ø´ó¶àÊýµÄÈËÖ»ÊìϤ¸ß²ãµÄ¿ò¼ÜÈçWebFormsºÍWebS ......
IIS 7 ĬÈÏÎļþÉÏ´«´óСʱ30M
ҪͻÆÆÕâ¸öÏÞÖÆ£º
1. ÐÞ¸ÄIISµÄapplicationhost.config
´ò¿ª %windir%\system32\inetsrv\config\applicationhost.config
ÕÒµ½£º <requestFiltering>½Úµã£¬
Õâ¸ö½ÚµãĬÈÏûÓÐ <requestLimits maxAllowedContentLength="ÉÏ´« ......
asp.net±éÀúHashTableÐèÒªÓõ½DictionaryEntry Object£¬asp.net±éÀúHashTable£¬¿ÉÒÔͨ¹ýÈçÏÂÁ½ÖÖ·½·¨À´ÊµÏÖ£¬
·½·¨Ò»£º
foreach (System.Collections.DictionaryEntry objDE in objHasTab)
{
Console.WriteLine(objDE.Key.ToString());
Console.WriteLine(objDE.Value.ToString ......
¾ÍÊÇÔÚʹÓÃjmail·¢ËÍÓʼþʱ£¬Ê¹ÓõÄÊÇ×Ô¶¯É¨Ãè¹æ¶¨¼ä¸ôʱ¼ä×Ô¶¯·¢Ë͵ģ¬ÏÖÔÚÊÇÏëʵÏÖÒѾ·¢Ë͵ÄÓʼþ½«²»ÔÙ·¢ËÍ£¬¸÷λ´óϺÔõôʵÏÖ£¬ÇóÖú£¡
Ê×ÏÈÃ÷È·µÄÊÇÔÚÊý¾Ý¿â±íÖв¢Ã»Óбêʶ×Ö¶ÎÀ´±æ±ðÓʼþÊÇ·ñÒѾ·¢ËÍ¡£Èç¹ûÎÒÀ´ÉèÖÃÒ»¸öÈ«¾Ö±äÁ¿À´´æ´¢ÕâЩÒѾ·¢ËÍÓʼþµÄID£¬È»ºóÔÚÔÙ´ÎɨÃèʱÀ´±æ±ðÕâЩIDÊÇ·ñÒѾ´æÔڵķ½Ê½À´Åжϣ¬¸ ......