Reputation: 141
I'm trying to display shared folder contents in doc library fashion in sharepoint 2007. I am able to get files from local dir c:\Test
but not from shared folder.
I am using below code to check:
if (Directory.Exists(@"\\servername\foldername\"))
If I try same code in .net application on same sharepoint server it is detecting the shared folder but no luck with sharepoint code
it says folder doesn't exist and we are using IIS anonymous with CA Siteminder authentication
any ideas are greatly appreciated!
Upvotes: 0
Views: 1075
Reputation: 2481
Make sure the IIS application pool of your sharepoint site is configured with a domain account
; and make sure this account have sufficient rights on the shared folder.
If your app pool is using a local account, you will need to impersonate using LogonUser (advapi32.dll)
.
Upvotes: 2