Compiler Error Message: CS0122: 'Wmb.Web.ImageRetrieverFactory' is inaccessible due to its protection level


I've spent about 4 hours tring to get this to work I keep getting this error looks like a good idea this would be great little item
Line 56: }
Line 57:
Line 58: _imageRetriever = ImageRetrieverFactory.Create(imageSrc, imageRetrieverClassName);
Line 59: if (_imageRetriever is ICustomDataConsumer) {
Line 60: ((ICustomDataConsumer)_imageRetriever).SetCustomData(ImageSettings.CustomData);
Visual Studio 2008\Tools\bip-34767\Main\Samples\Web\App_Code\ImageHandler.cs Line: 58

file attachments


Webbes wrote Feb 14, 2010 at 12:21 PM


For as far as I can see, you are creating your own ImageHandler which is trying to use a class "ImageRetrieverFactory" which has the "internal" accessor. "internal" means that only classes in that same dll can access the specific class. As you are creating your own handler, which is not inside that same dll, it indeed will nog work.

If you do like to create your own handler, and use the classes, either add youo handler to the Wmb.Web project OR change the accessor from "internal" to public.



wrote Feb 14, 2010 at 12:25 PM

rickj wrote Feb 15, 2010 at 6:52 AM

I never created anything I downloaded the code and tried to run in VS then tried to view Defalt.aspx in the web solution I never wrote any code I tried to run the down load from this

Webbes wrote Feb 15, 2010 at 7:35 AM

It's not an issue with the library. It is an external customization that doesn't work the way the developer expects.

** Closed by Webbes 2/14/2010 4:25 AM

Webbes wrote Feb 15, 2010 at 7:35 AM

eems to be a solution error.

Webbes wrote Feb 15, 2010 at 7:45 AM

Unfortunately I am not able to reproduce the error. The error seems to be in a file "Visual Studio 2008\Tools\bip-34767\Main\Samples\Web\App_Code\ImageHandler.cs" which I did not add to the solution and do not have in the solution either when I downloaded it myself. If you look at the attached screenshot, you'll notice I do not even have an App_Code folder inside the solution. Could you send me a copy of your solution? My hotmail.com account is websware.

wrote Feb 15, 2010 at 7:45 AM

wrote Feb 13, 2013 at 4:03 AM