没那么复杂吧
IIS站点里做一个web Service
客户端引用这个web Service
 在web Service中实现一个方法  bool DelFile(string FilePath)  客户端调用..  web service 最后做标头验证.

解决方案 »

  1.   

    嗯,使用webservice也许是一个好办法
    给一篇孟子的文章
    你也许有用
    http://dotnet.aspx.cc/ShowDetail.aspx?id=6381BD5F-51F3-4339-4239-1328564A1B2A
      

  2.   

    必须调用服务端的方法,不可能在客户端直接删除,需要服务端支持,webService等各种方法都行
      

  3.   


    谢谢各位:不过首先强调的是我用的客户端是winform的。Firestone2003(笨笨小猪)  提供的是Asp页面上删除的功能。我在服务器端建立了webSevice,但我现在还不知道具体的服务器的IP地址呢?无法在客户端引用web引用。还请各位高手赐教。
      

  4.   

    域名就行了,真接添加引用然后 .Url=domainname 就是了
      

  5.   

    对服务器操作,最好用WebService,传个参数验证一下权限
      

  6.   

    最好做证书或者标头验证
    //使用 Soap 标头自定义身份验证和授权 
    public class AuthHeader : SoapHeader 
    {
    public string Username;
    public string Password;
    }
    [WebService(Namespace="http://www.disku.net/service")]
    public class DirInfo : System.Web.Services.WebService
    {   private DataSet UserHtmlDefault  = null;
    string StrHtml="";
    public AuthHeader sHeader;
    public DirInfo()
    {
    InitializeComponent();
    }private bool AuthenticateUser(string usr, string pwd) 
    {
                
    if ((usr == "xxxxxx")&&(pwd =="xxxxx")) 
    {
    return true;
    }
    return false;
    }
    [WebMethod(Description="删除用户目录")]
    [SoapHeader("sHeader")]//应用标头
    public void Del(string FilePath)
    {
     //删除操作
    }}
    SoapHeader需要引入
    System.Web.Services.Protocols;
    通过IDE添加web引用后会自动生成一个AuthHeader类如果命名空间为xxxx                   xxxx.mywebservice hp=new xxxx.mywebservice();
    hp.Url="http://"+server+"/service.asmx";
    xxxx.AuthHeader myHeader=new xxxx.AuthHeader();

    myHeader.Username = "xxxxx";
    myHeader.Password = "xxxxx";
    hp.AuthHeaderValue=myHeader;  验证代码 ,这样你就可以通过    hp.Del(路径) 来删除文件了
      

  7.   

    解决网址:http://chs.gotdotnet.com/quickstart/howto/doc/Remoting/mainfeatures.aspx