After fixing "That assembly does not allow partially trusted callers." thumbnails do not display

Dec 31, 2010 at 11:48 AM
I am using the notesforgallery control to provide a simple gallery in a website.
All worked well on my test site but when I loaded it up to my ISP navigating to the page with the control caused an error:
That assembly does not allow partially trusted callers.

Research indicated that I needed to have the control 'unsigned'
so I have downloaded the source for notesforgallery and opened the NotesForGallery.csproj file in the folder notesforgallery as a project in VWD.
In the properties page I unchecked the 'Sign the assembly' box on the signing tab. I then selected Build>Build NotesForgallery
The build appeared to have succedded indicating the path for the dll as
C:\Websites\Controls\NotesForGallery-src\NotesForGallery\NotesForGallery\bin\Debug\Note sForGallery.dll
I added this dll and the notesforgalery.pdb file in the folder to the bin folder in my website using rightclick>add existing item.
I then used website>add reference and browsed to the bin directory to locate notesforgallery.dll
I then did Build>rebuild website.
A test on my local PC still works perfectly (as indeed it did before)
Then I loaded the complete new bin directory to the live site and the page containing the control.
Now when I navigate to the page containing the control I do not get an error but the thumbnails do not display -- just a small empty 'box'. If I click on any box the appropriate image is correctly displayed.
So, thumbnail handler not working? but why?
In my web.config (as per instructions) I have the statement
<add verb="*" path="ThumbnailHandler.ashx" type="NotesFor.ThumbnailHandler, NotesForGallery"/>
Searching for ThumbnailHandler.ashx showed a reference to it in Gallery.cs in the control source and there is also a thumbnail.cs but no .ashx?
Presumably I haven't recompiled it properly or uploaded it correctly but I canot see where I have made my mistake?


Jan 4, 2011 at 10:48 PM

Can anyone help with this??