This project is read-only.

Assembly Flickr.NET cannot be loaded


I uploaded the files to shared hosting, and I get an access denied when loading the file.
To fix it for now, I added a reference to Flickr.NET and removed the assembly loading in the ProviderFactory.
However, I think dynamic loading of assemblies is not supported on shared hosting.


jelled wrote Sep 3, 2010 at 7:55 AM

Can you give me an exception stack trace (with full file line numbers and path thanks to the pdb file :-D) for the access denied error? I'm using a shared hosting provider as well and haven't seen this problem... So it might depend on the hosting provider perhaps. I'd like to keep the dynamic loading since the point of the provider model is obviously that providers can be dynamically added :-)

GeertvanHorrik wrote Sep 3, 2010 at 10:43 AM

Requested URL: /photoprovider
User Host: (
User Languages: en-US, en;q=0.8
Exception Stack Trace: System.IO.FileLoadException: Could not load file or assembly 'FlickrNet, Version=, Culture=neutral, PublicKeyToken=2491df59efa5d132' or one of its dependencies. Access is denied.
File name: 'FlickrNet, Version=, Culture=neutral, PublicKeyToken=2491df59efa5d132' ---> System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
at System.Reflection.Assembly.nLoadFile(String path, Evidence evidence)
at System.Reflection.Assembly.LoadFile(String path)
at Mayando.Web.Providers.ProviderFactory2.GetAvailableProviders() in Mayando.Web\Providers\ProviderFactory.cs:line 63
at Mayando.Web.Controllers.PhotoProviderController.Index() in Mayando.Web\Controllers\PhotoProviderController.cs:line 30
at lambda_method(ExecutionScope , ControllerBase , Object[] )
at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary
2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 parameters)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClassa.<InvokeActionMethodWithFilters>b__7()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func
1 continuation)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClassa.<>c__DisplayClassc.<InvokeActionMethodWithFilters>b__9()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList1 filters, ActionDescriptor actionDescriptor, IDictionary2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)

wrote Feb 14, 2013 at 2:01 AM