简体   繁体   中英

DefaultNetworkCredentials not working from crm

I'm making a CRM 2011 workflow activity that is supposed to create folders in a given SharePoint. I am doing this by calling "MKCOL" method of HttpWebRequest.

Before making my code into a workflow activity, I made a console app that uses DefaultNetworkCredentials and it worked (the folders appeared in SharePoint). However, after converting my code into a workflow activity and running it from CRM, it no longer works.

Besides switching the class to inherit from CodeActivity, I didn't change the HttpWebRequest code.

I was under the impression the DefaultNetworkCredentials would use my (the current user's) credentials, so why do my credentials no longer work in CRM?

Thanks for any help,
Scott

Workflows run under the Async Worfklow service, not the user that is actually triggering the service. You'll need to set the credentials in code, or update the account that runs the service .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM