UnauthorizedAccessException

Topics: Developer Forum
Jul 27, 2011 at 9:54 PM

Everything works fine on my local machine using the asp development server but, when published to IIS 7 I get this below error - any help is appreciated.

System.UnauthorizedAccessException: Access to the path 'FlickrNet' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj)
   at System.IO.Directory.CreateDirectory(String path)
   at FlickrNet.LockFile.Acquire()
   at FlickrNet.PersistentCache.Get(String key, TimeSpan maxAge, Boolean removeIfExpired)
   at FlickrNet.Flickr.GetResponse[T](Dictionary`2 parameters, TimeSpan cacheTimeout)


   at FlickrNet.Flickr.PhotosetsGetPhotos(String photosetId, PhotoSearchExtras extras, PrivacyFilter privacyFilter, Int32 page, Int32 perPage, MediaType media)
   at FlickrNet.Flickr.PhotosetsGetPhotos(String photosetId, PhotoSearchExtras extras, PrivacyFilter privacyFilter, Int32 page, Int32 perPage)
   at FlickrNet.Flickr.PhotosetsGetPhotos(String photosetId, PhotoSearchExtras extras, Int32 page, Int32 perPage)
   at digital.Web.UI.FlickrFeed.FlickrFeed.PopulateControls()
   at digital.Web.UI.FlickrFeed.FlickrFeed.Page_Load(Object sender, EventArgs e)
   at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
  

Jul 27, 2011 at 10:14 PM

I was able to fix this with the web.config using the below code if anybody else has this issue.

 

<configSections> 

           <section name="flickrNet" type="FlickrNet.FlickrConfigurationManager,FlickrNet"/>

  </configSections>  


 <flickrNet cacheDisabled="true" />