忘了说了,我的文件是jpg文件。路径为\\Jwin2k-hexl\image\001.jpg

解决方案 »

  1.   

    permissions, ASPNET account doesn't have network credentials, consider to create a weak domain account and use impersonation, seehttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconaspnetimpersonation.asphttp://support.microsoft.com/?kbid=306158
      

  2.   

    #define UNICODE
    #include <windows.h>
    #include <stdio.h>
    #include <lm.h>void wmain( int argc, TCHAR *argv[ ])
    {
       NET_API_STATUS res;
       SHARE_INFO_2 p;
       DWORD parm_err = 0;   if(argc<4)
          printf("Usage: Share server netname path\n");
       else
       {
       
       p.shi2_netname= argv[2];
       
       p.shi2_type = STYPE_SPECIAL; // disk drive
       p.shi2_re = TEXT("");
       p.shi2_permissions = ACCESS_ALL;    
       p.shi2_max_uses = -1;
       p.shi2_current_uses = 0;    
       p.shi2_path =  argv[3];
       p.shi2_passwd = NULL; // no password
         
          res=NetShareAdd(argv[1], 2, (LPBYTE) &p, &parm_err);
          //
          // If the call succeeds, inform the user.
          //
          if(res==0)
             printf("Share created.\n");
          
          // Otherwise, print an error,
          //  and identify the parameter in error.
          else
             printf("Error: %u\tparmerr=%u\n", res, parm_err);
       }
       return ;
    }
    打通映射后可用fso操作
      

  3.   

    once you have a domain account, give it access to your shared folder,....
      

  4.   

    File.Exists()好象只能判断本机的文件是否存在,要实现你的功能,可以做一个WebService实现
      

  5.   

    谢谢大家,能不能给出具体的代码。小弟在这里多谢了。
    to yirouyun:你给的是c的代码,我是用vb.net和asp.net,不能插入c的代码啊