"That assembly does not allow partially trusted callers" - ESRI.ArcGIS.Client.dll

436
4
01-11-2011 10:45 AM
SangamLama
New Contributor
Hi there,

I just deployed a silverlight mapping app as a sharepoint web part. Prior to this, it was working fine as a standalone app. But trying to run the webpart, I get the aforementioned error when it tries to talk to the ESRI.ArcGIS.Client.dll.

I read several jabbers about how one should add AllowPartiallyTrustedCallers attribute to the project whose assembly is being used. Obviously, the fact that I don't have access to the source code for that dll makes it impossible to do so.

I added the dll as a safecontrol in my sharepoint site's web.config. Surprizingly, that didn't help. And then I supplied the dll as a safecontrol to the GAC. Even that didn't work.

The only workaround I have found so far is by increasing the trustlevel to full in web.config. The application worked fine that way. But again, I can't keep it that way for ovbious reasons.

So, can anyone shade some light into what else I could do?


thanks!
0 Kudos
4 Replies
dotMorten_esri
Esri Notable Contributor
I'm not a SharePoint expert, but since the Silverlight app runs entirely in the browser and the dll's are packaged in the .xap file, I doubt any of what you are trying to do applies here. For instance you don't GAC Silverlight DLLs.
0 Kudos
DanielWalton
Occasional Contributor
You aren't by chance using the WPF ESRI.ArcGIS.Client.dll API anywhere in your web project are you?
0 Kudos
SangamLama
New Contributor
Woops! I re-read my own post and it almost doesn't make sense without the clarification -- it's the WPF version of the dll that's having issue. I'm using it on the webservice layer where the data's coming out from. When I said my SL app, I meant the entire web part. My bad! 🙂

So the silverlight side isn't facing any issues, obviously because the Client.dll it needs is part of the xap file itself.

I know I need to somehow grant it the Code Access Security separately so that other assemblies are still barred from full trust level. I'm trying several things right now. If anyone here knows what I might need, please drop a note.

Thanks!
0 Kudos
dotMorten_esri
Esri Notable Contributor
I know that ESRI's SharePoint installation registers the .NET 3.5 WPF dll in the GAC, but that's about it.
0 Kudos