locked
Async Plugin uploads file to MOSS - privileges? RRS feed

  • Question

  • Hi,

    my async plugin uploads files to a sharepoint doc lib. The CRM App Pool and the CRM Async Service both run as "Network Service".
    The upload works fine, as long as the doclib is on the same system. But of course, it does not work for uploading files to a sharepoint thats running on a different server.

    I guess i have to change the credentials of the CRM async process to make this work. My question is now: What exactly do i have to do regarding this?

    Thanks in advance,
    Jan
    Tuesday, May 19, 2009 6:26 AM

Answers

  • Code running under the local Network Service account will connect to another machine using the computer account, instead of a user account. So, in SharePoint you should be able to grant permission to the compaute account of the machine running the CRM Async Process


    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk
    Tuesday, May 19, 2009 7:46 AM
    Moderator

All replies

  • Hi, Jan.

    You can pass your credentials (username, password and domain) to your plugin trough 'config' parameter of constructor of your plugin and in the body of plugin use them to access to Sharepoint Web Services using credentials created like^

                NetworkCredential credential = new NetworkCredential('username', 'password', 'domainname');
    


    I hope this idea will help you.

    Truth is opened the prepared mind My blog - http://a33ik.blogspot.com
    Tuesday, May 19, 2009 7:30 AM
    Moderator
  • Code running under the local Network Service account will connect to another machine using the computer account, instead of a user account. So, in SharePoint you should be able to grant permission to the compaute account of the machine running the CRM Async Process


    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk
    Tuesday, May 19, 2009 7:46 AM
    Moderator
  • Sounds good, please help me with one more answer:

    -My plugin is runnning as the local network service account
    -the task is: create a folder in the doclib and upload a pdf file to that folder
    -it creates the folder, "created by: CRM$" ("crm" is the crm machine)
    -it does not put the file in that new folder

    What might be the problem? Why is the folder created, put nothing uploaded to it?

    Thanks!
    Jan
    Tuesday, May 19, 2009 7:57 AM