本帖最后由 fihuang 于 2010-03-29 02:44:08 编辑

解决方案 »

  1.   

    用WNetUseConnection API首先建立ipc连接,然后和读写本地文件一样,用unc路径访问即可。WNetUseConnection Function
    The WNetUseConnection function makes a connection to a network resource. The function can redirect a local device to a network resource.The WNetUseConnection function is similar to the WNetAddConnection3 function. The main difference is that WNetUseConnection can automatically select an unused local device to redirect to the network resource.Syntax
    C++ DWORD WNetUseConnection(
      __in     HWND hwndOwner,
      __in     LPNETRESOURCE lpNetResource,
      __in     LPCTSTR lpPassword,
      __in     LPCTSTR lpUserID,
      __in     DWORD dwFlags,
      __out    LPTSTR lpAccessName,
      __inout  LPDWORD lpBufferSize,
      __out    LPDWORD lpResult
    );
      

  2.   

    权限问题  改成everyone所有权
      

  3.   

    web.config中加:
    <identity impersonate="true" userName="administrator" password="xxxxxx" />
      

  4.   


    web.config<identity impersonate="true" userName="administrator" password="xxxxxx" />