开发者

Accessing File system from SharePoint - Access denied

I've created a custom SharePoint application which extends some of the OOTB functionality of SharePoint. Now I want to license the application and provide trial periods etc. So I want to store the licensing information in the file system/registry and check the validity of the license across the application. But even after I elevate to the application pool identity (who is just a domain user and not a system administrator as advised here http://technet.microsoft.com/en-us/library/cc678863%28office.12%29.aspx) I'm getting access denied for accessing my file.

What is the common practice to read/write/create files in 开发者_JAVA百科the file system from SharePoint application?


Have you checked thet security logs to see which user is being denied access. I am pretty sure it will be the user who is logged into sharepoint rather than the app pool identity that is trying to access the file. The app poolidentity is usually only used in this way if the web site is using anonymous authentication.


Are you using SharePoint 2010 or 2007? What kind of Authentication? NTLM, Forms or Claims based?

If application is running under NTLM, then as Ben suggested, application will run under NTLM account and you should be able to access the resource.

If running under forms the application will run as anonymous user (local account), which will fail to access the shared resource.

I would suggest using ProcMon, it will capture the underlying access denied error and what user is being used to access that.


I guess there is no other solution apart from storing it in a custom database or a custom folder which is configured with full access for the application pool account.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜