都是用winfrom写的
问题1:发送邮件程序在xp系统下都能发送,在windows server 2003的系统不能发送       string fjrtxt = "[email protected]"; //发件者邮箱地址
            string mmtxt = "qq123"; //发件者邮箱密码
            string sjrtxt = "[email protected]";//收件人收箱地址
            string zttxt = "这是厕所";//主题            string nrtxt = "这是测试";//内容
            string[] fasong = fjrtxt.Split('@');
            string[] fs = fasong[1].Split('.');
            //发送
            SmtpClient client = new SmtpClient("smtp." + fs[0].ToString().Trim() + ".com"); //设置邮件协议
            client.UseDefaultCredentials = false;//这一句得写前面
            client.DeliveryMethod = SmtpDeliveryMethod.Network; //通过网络发送到Smtp服务器
            client.Credentials = new NetworkCredential(fasong[0].ToString(), mmtxt); //通过用户名和密码 认证
            MailMessage mmsg = new MailMessage(new MailAddress(fjrtxt), new MailAddress(sjrtxt)); //发件人和收件人的邮箱地址
            mmsg.Subject = zttxt; //邮件主题
            mmsg.SubjectEncoding = Encoding.UTF8; //主题编码
            mmsg.Body = nrtxt; //邮件正文
            mmsg.BodyEncoding = Encoding.UTF8; //正文编码
            mmsg.IsBodyHtml = true; //设置为HTML格式
            mmsg.Priority = MailPriority.High; //优先级
            try
            {
                client.Send(mmsg);            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
问题2:同样上传图片到服务器,在xp系统下都能上传,在windows server 2003的系统不能上传
   客户端代码:
      OpenFileDialog openFileDialog1 = new OpenFileDialog();
            openFileDialog1.Filter = "图像文件 (*.BMP;*.JPG;*.GIF;*.PNG)|*.BMP;*.JPG;*.GIF;*.PNG"; //上傳格式            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                string fullpath = openFileDialog1.FileName;//文件路径 
                System.Net.WebClient myWebClient = new System.Net.WebClient();
                myWebClient.UploadFile("http://localhost/up/Uploader.ashx", "POST", fullpath);  
                          }
   服务器代码:
  <%@ WebHandler Language="C#" Class="Uploader" %>using System;
using System.Web;
using System.IO;
public class Uploader : IHttpHandler {
 
    public void ProcessRequest(HttpContext hc)
    {
        foreach (string fileKey in hc.Request.Files)
        {
            HttpPostedFile file = hc.Request.Files[fileKey];
            file.SaveAs(Path.Combine(hc.Server.MapPath("."), file.FileName));
         
        }
    }
   public bool IsReusable
    {
        get { return true; }
    }   
}   小弟觉得应该不是代码的问题,难道是windows server 2003做这两个功能需要什么组件???????????