web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Error : That assembly does not allow partially trusted callers

(0) ShareShare
ReportReport
Posted on by

Hi,,

I have D365 online , and I created a plugin that having a service to send SMS messages.

That service it's out side source, I added to the project as service reference  (Visual Studio 'C#').

The code giving me the error is :-

 SMS.SMSIntegration webserviceSendMsg = new SMS.SMSIntegration();


when I'm trying to create an object from that class to send the SMS message, the D365 giving me this error :-

5078.BPE.jpg

Your help in this regard will be highly appreciated!

Thanks ..

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    MartinOmidvar Profile Picture
    101 on at

    If you decide to call a web service inside a Plugin or WF it must have good and correct structure.

    Some SMS provider are not valid for Dynamics Online.

    It means that you have to write more code for them.

    Please, first of all, check your C# code in windows console.

    If your code is correct and it works, but the problem is when you register it in Dynamics, please try with other SMS provider. ( Also you can make a good structure with C# your self. )

  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi Majed,

    You cannot call the external service using service reference on CRM Online. You would need to call this service programmatically.

    Check this link-

    docs.microsoft.com/.../how-to-specify-a-client-binding-in-code

    community.dynamics.com/.../how-to-call-a-web-service-from-plugin-in-dynamics-crm

    Hope this helps.

  • Community Member Profile Picture
    on at

    Hi,
     
    You can't reference on external libraries inside your plugins.

    You should try to use ILMerge to include missing lib into you plugin assembly.
     
    Hope this helps

    Vlad

    http://dynamicalabs.com/

  • Community Member Profile Picture
    on at

    Thanks guys for your answers.

    This issue has been solved by using API service (instead of DLL) I got it from the SMS provider.

    Regards ..

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans