Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
An alternative solution could be to impersonate a user with sufficient permissions in the scheduled job,
/johan
Hi Nitin.
You can get the UnifedDirectory by giving bypass access check this way:
UnifiedDirectory dir = EPiServer.Web.Hosting.VirtualPathHandler.Instance.GetDirectory("virtualPath", true) as UnifiedDirectory;
if(dir != null)
{
// Do your stuff
}
But the best way is probably to impersonate as Johan says. Look at Erik Nordin`s blog for a great example on impersonation in a scheduled job. http://antecknat.se/blog/2009/03/04/scheduled-tasks-tips/
Hope this helps!
Br, Tore
I am trying to access a VPP folder through Job-Subscription.
This folder do not have EVERYONE access rights defined in FileManagement, and as Job-Scheduler needs Everyone access to explore this folder through code it fails. and gives error as "Dont have sufficient access to this folder".
UnifiedDirectory dir = HostingEnvironment.VirtualPathProvider.GetDirectory(VirtualPath) as UnifiedDirectory;
How will you give BYPASSACCESSCHECK to a Unifieddirectory as the above statement gives error.