locked
Urgent! unable to access network file in SP Workflow RRS feed

  • Question

  • Hi, 

    I am trying to move files from a mapped drive to the SharePoint Document Library by using workflow. 

    I try to verify that the file in a mapped drive/ network folder exists before move into Document Library. I simply use the following code to check the file exists. 

    File.Exists(@"Z:\A.txt");

    or

    File.Exists(@"\\<server name>\<folder>\A.txt");

    But this code always return false even the file exists. I also try to run this code in a console application and it works. I am wondering is there any setting that prevent me from access mapped drive in SharePoint? 

    Thanks & Regards,

    Karen

    Thursday, May 10, 2012 4:06 AM

Answers

  • Are you able to see under with useraccount the workflow tries to access the unc path? Maybe with the account of the application pool of the sp web application? Doe this account has access to the unc path?

    Thursday, May 10, 2012 5:48 AM
  • Check the permissions of the network share. 

    Br,

    Ronald

    Thursday, May 10, 2012 7:48 AM

All replies

  • Are you able to see under with useraccount the workflow tries to access the unc path? Maybe with the account of the application pool of the sp web application? Doe this account has access to the unc path?

    Thursday, May 10, 2012 5:48 AM
  • the workflow is running update System Account.
    Thursday, May 10, 2012 7:23 AM
  • Check the permissions of the network share. 

    Br,

    Ronald

    Thursday, May 10, 2012 7:48 AM
  • Thanks for reply.

    I have no ideas which group/ user I have to add to ther permissions of the network share.
    The SharePoint server and the server hosting the folder are under same domain. I have shared the folder with everyone now, but it's not work. 


    Thursday, May 10, 2012 8:52 AM
  • Hi everyone,

    I finally find out what the problem is. I login as a domain\administrator. After I login as a different user, the code run successfully. Always SharePoint\System account cause problems. :[

    Thanks for everyone help.

    Friday, May 11, 2012 2:33 AM