Answered by:
Metadataservice in ASP.Net: That assembly does not allow partially trusted callers.

Question
-
So I'm building a website in VB.Net that accesses a CRM with internet facing deployment. I am using the API. Everything works fine on my dev server. Now when I deploy to the website to the ISP that is in a shared hosting environment. I get this error when I try anything CRM related when I dim the Metadataservice. Is there a workaround? It seems a rather benign operation, I'm just querying CRM.
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: That assembly does not allow partially trusted callers.
Source Error:Line 22: Dim CrmService As New CrmService() Line 23: Dim intOpenState As Integer Line 24: Dim MetaService As New MetadataService() Line 25: Dim intMetaOpenState As Integer Line 26:
Friday, May 14, 2010 2:03 PM
Answers
-
Have you signed your assembly?.
MSCRM Bing'd - http://bingsoft.wordpress.com- Marked as answer by Donna EdwardsMVP Tuesday, May 18, 2010 1:42 PM
Friday, May 14, 2010 2:50 PMModerator -
Go to Properties on the project and select the Signing Tab from the Properties dialog. Then select the opiton to sign the assembly.
MSCRM Bing'd - http://bingsoft.wordpress.com- Marked as answer by Donna EdwardsMVP Tuesday, May 18, 2010 1:42 PM
Tuesday, May 18, 2010 8:33 AMModerator
All replies
-
Have you signed your assembly?.
MSCRM Bing'd - http://bingsoft.wordpress.com- Marked as answer by Donna EdwardsMVP Tuesday, May 18, 2010 1:42 PM
Friday, May 14, 2010 2:50 PMModerator -
I don't think so... how do I do that in Visual Studio Express? I never done that before. I have the site opened as a website.Monday, May 17, 2010 2:11 PM
-
Go to Properties on the project and select the Signing Tab from the Properties dialog. Then select the opiton to sign the assembly.
MSCRM Bing'd - http://bingsoft.wordpress.com- Marked as answer by Donna EdwardsMVP Tuesday, May 18, 2010 1:42 PM
Tuesday, May 18, 2010 8:33 AMModerator -
How can I do this if it's just a website and not a project? I don't see that option. I assume that I need to sign the DLLs, I am using the one for MetadataService
Which I think is in microsoft.crm.sdktypeproxy.dll which I got in the SDK.
Wednesday, May 26, 2010 7:29 PM